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
// a modification from http://goo.gl/tLbLXr | |
var attachEvent = function(element, event, fn) { | |
if (element.addEventListener) | |
element.addEventListener(event, fn, false); | |
else if (element.attachEvent) // if IE | |
element.attachEvent('on' + event, fn); | |
} | |
var onReady = function(func) { |
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
(function(){ | |
function attachEvent(element, event, fn) { | |
if (element.addEventListener) { | |
element.addEventListener(event, fn, false); | |
} else if (element.attachEvent) { | |
element.attachEvent('on' + event, fn); | |
} | |
} | |
window.ready = window.onReady = function(func) { |
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
// Batch Big5-URLDecoder | |
// go visit http://www.mytju.com/classcode/tools/urldecode_big5.asp | |
(function insertScripts(src) { | |
if (src instanceof Array && src.length) { | |
insertScripts(src.shift()) | |
return insertScripts(src); | |
} | |
var script = document.createElement('script'); | |
script.type = 'text/javascript'; |
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
function MyArray() { | |
var parent = { // Remember the Origional-methods | |
push: this.push | |
} | |
this.push = function (element) { // Override | |
// Do my actions | |
return parent.push.apply(this, arguments); | |
} |
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
setInterval(function () { | |
// 取得網頁上所有連結 | |
var a = document.getElementsByTagName('a'); | |
// 針對每個連結跑一次 | |
for (var i in a) { | |
// 檢查是不是真的是連結 | |
if (a.hasOwnProperty(i)) { | |
// 檢查是不是讚的連結 | |
if (a[i].className == "UFILikeLink") { | |
// 檢查是不是還沒按過讚 |
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
(function insertScripts(src) { | |
if (src instanceof Array && src.length) { | |
insertScripts(src.shift()) | |
return insertScripts(src); | |
} | |
var script = document.createElement('script'); | |
script.type = 'text/javascript'; | |
script.src = src; | |
document.head.appendChild(script); | |
})([ |
NewerOlder