NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name UW Learn session extender
// @namespace wengh's scripts
// @match https://learn.uwaterloo.ca/*
// @grant none
// @version 1.0
// @author wengh
// @license MIT
// ==/UserScript==
function check() {
const alert = document.querySelector('#d2l_sessionExpiryAlert');
console.log(alert);
if (alert !== null) {
if (alert.style.display !== 'none') {
console.log('Session about to time out. Clicking on page to extend session...');
alert.click();
}
}
}
(() => {
setInterval(check, 120 * 1000);
})();