Skip to content

Instantly share code, notes, and snippets.

@johnroyer
Created February 12, 2015 03:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnroyer/147239eda116a01dc464 to your computer and use it in GitHub Desktop.
Save johnroyer/147239eda116a01dc464 to your computer and use it in GitHub Desktop.
露天防釣魚檢查工具
// ==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