Skip to content

Instantly share code, notes, and snippets.

@mingtsay
Forked from anonymous/oppose_cheat.js
Last active August 29, 2015 13:58
Show Gist options
  • Save mingtsay/9942334 to your computer and use it in GitHub Desktop.
Save mingtsay/9942334 to your computer and use it in GitHub Desktop.
Cheat script for www.oppose.tw
(function() {
$btnYes = $('.btn-yes')[0];
$btnNo = $('.btn-no' )[0];
$content = $('.show-content')[0];
function cheat() {
if (l = $content.innerHTML.length) {
l % 2 ? $btnNo.click() : $btnYes.click();
}
setTimeout(cheat);
}
cheat();
}).call(this);
(function() {
_Yes = '#2ECC71';
_No = '#E74C3C';
_ = '#425B75';
$content = $('.show-content')[0];
function cheat() {
$content.style.color = ((l = $content.innerHTML.length) ? (l % 2 ? _No : _Yes) : _);
setTimeout(cheat, 200);
}
cheat();
}).call(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment