Last active
August 29, 2015 14:02
-
-
Save mingtsay/99d884c5b3a8f195c118 to your computer and use it in GitHub Desktop.
This file contains 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") { | |
// 檢查是不是還沒按過讚 | |
if (a[i].title == "覺得這很讚") { | |
// 檢查能不能點下去 | |
if (a[i].click) { | |
// 點下去 | |
a[i].click(); | |
// 在 console 顯示已讚字樣 | |
console.log('已讚', i); | |
} | |
} | |
} | |
} | |
} | |
}, 200); |
This file contains 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 = $$("._42ft._4jy0._4jy3._4jy1.selected"); | |
for (var i in a) { | |
if (a.hasOwnProperty(i) && a[i].click) { | |
a[i].click(); | |
} | |
} | |
}, 200); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
到底在讚什麼啦! 已讚