Created
February 9, 2012 06:37
-
-
Save hc5/1777872 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 WebCT Multiple sessions and Never expiring mymcgill sessions | |
// @namespace fuck webct | |
// @description ^ | |
// @include https://mycourses.mcgill.ca/webct/cobaltMainFrame.dowebct?* | |
// @include http://mycourses.mcgill.ca/webct/cobaltMainFrame.dowebct?* | |
// @include https://mymcgill.mcgill.ca/portal/page/portal* | |
// @include http://mymcgill.mcgill.ca/portal/page/portal* | |
// ==/UserScript== | |
if(document.location.href.indexOf("cobaltMainFrame")>-1){ | |
document.cookie = "uid2=" | |
} | |
else if(document.location.href.indexOf("mymcgill.mcgill.ca/portal/page/portal")>-1){ | |
//only way to access the page scope from chrome's sandboxed userscript env | |
var s = document.createElement("script"); | |
s.innerHTML = 'startTimer = function(){return 0;};redirect_to_logout = function(){return 0;}'; | |
document.body.appendChild(s); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment