Created
February 12, 2015 03:31
-
-
Save johnroyer/147239eda116a01dc464 to your computer and use it in GitHub Desktop.
露天防釣魚檢查工具
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name CorrectRuten | |
// @namespace http://www.ruten.com.tw | |
// @description Change some element on login page | |
// @include https://*.ruten.com.tw/user/login.htm* | |
// @include http://member.stage2.ruten.com.tw/user/login.htm* | |
// ==/UserScript== | |
// Change logo | |
var img = document.getElementsByTagName("img"); | |
img && Array.prototype.every.call(img, function (val, idx) { | |
if (/logo\.gif$/.test(val.src)) { | |
val.setAttribute('src', 'http://i.imgur.com/3TAYp2q.jpg'); | |
return false; | |
} | |
return true; | |
}); | |
// change login title background color | |
var td = document.getElementsByTagName("td"); | |
td && Array.prototype.every.call(td, function(val, elem){ | |
if(!!val.getAttribute('background') && val.getAttribute('background').match(/images\/login_03.jpg/)){ | |
val.setAttribute('background', ''); | |
val.style.backgroundColor = 'green'; | |
return false; | |
} | |
return true; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment