Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// ==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
You can’t perform that action at this time.