Skip to content

Instantly share code, notes, and snippets.

@hc5
Created February 9, 2012 06:37
Show Gist options
  • Save hc5/1777872 to your computer and use it in GitHub Desktop.
Save hc5/1777872 to your computer and use it in GitHub Desktop.
// ==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