Last active
November 8, 2017 03:30
-
-
Save ZhangYiJiang/1e96237906e0566524f925ff7c837c27 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
// ==UserScript== | |
// @name IVLE LMS Quiz taker | |
// @namespace yijiang | |
// @version 0.1 | |
// @description Completes IVLE LMS modules by randomly clicking on buttons | |
// @author Zhang Yijiang | |
// @match https://ivle.nus.edu.sg/Databank/LMS/* | |
// ==/UserScript== | |
(function(window){ | |
const d = window.document; | |
setInterval(() => { | |
// Look for things that may be glowing | |
const glowing = d.querySelectorAll('#Stage div[class*="glow"], .Stage_blocker_id'); | |
// Uncomment line below to debug | |
// if (glowing.length) console.log(glowing); | |
glowing.forEach((ele) => { | |
// Randomly click on 1/4 of the buttons on the screen | |
if (Math.random() > 0.25) ele.click(); | |
}); | |
}, 1000); // Repeat this every second | |
})(window); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment