Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// ==UserScript==
// @name Check Course Availability
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://student.uwo.ca/psp/heprdweb/EMPLOYEE/HRMS/c/UWO_WISG.WSA_STDNT_CENTER.GBL
// @grant none
// ==/UserScript==
(function() {
'use strict';
alert('test');
startTimer();
function startTimer() {
checkCourseAvailability();
setTimeout(60000, function() {
startTimer();
});
}
function checkCourseAvailability() {
var searchTerm = document.getElementById('CLASS_SRCH_WRK2_CATALOG_NBR$8$');
var searchClosed = document.getElementById('CLASS_SRCH_WRK2_SSR_OPEN_ONLY');
var searchButton = document.getElementById('CLASS_SRCH_WRK2_SSR_PB_CLASS_SRCH');
if(searchTerm && searchClosed && searchButton) {
searchTerm.value = '1200';
searchClosed.click();
searchButton.click();
}
var searchTimer = setTimeout(5000, function() {
submitAction_win0(document.win0,'DERIVED_CLSRCH_SSR_EXPAND_COLLAP2$182$$1');
if ($('[id="win0divDERIVED_CLSRCH_SSR_STATUS_LONG$3"] img').src != "https://student.uwo.ca/cs/heprdweb/cache/PS_CS_STATUS_CLOSED_ICN_1.gif")
{
}
});
}
})();
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.