Skip to content

Instantly share code, notes, and snippets.

@mingtsay
Last active August 29, 2015 14:02
Show Gist options
  • Save mingtsay/99d884c5b3a8f195c118 to your computer and use it in GitHub Desktop.
Save mingtsay/99d884c5b3a8f195c118 to your computer and use it in GitHub Desktop.
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);
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);
@lackneets
Copy link

到底在讚什麼啦! 已讚

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment