Created
October 30, 2012 14:03
-
-
Save clonejo/3980341 to your computer and use it in GitHub Desktop.
Campus-Office-Session-Longer
This file contains hidden or 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 Campus-Office-Session-Longer | |
| // @namespace campus-office-session-longer | |
| // @description Stops session expiration in Campus Office by regularly loading a page in background. | |
| // @include https://www.campus.rwth-aachen.de/office/views/* | |
| // @version 1 | |
| // @require http://code.jquery.com/jquery-1.8.2.min.js | |
| // ==/UserScript== | |
| interval = 10*60*1000; | |
| backgroundUrl = "https://www.campus.rwth-aachen.de/office/views/birthday/birthday.asp"; | |
| $("body").append('<div id="session-longer" style="position: fixed; right: 0px; bottom: 0px; background-color: white; border: 3px solid black;">Session Longer! next reload in ' + interval/1000 + ' seconds</div>'); | |
| setInterval(function() { | |
| $('#session-longer').html("loading..."); | |
| $.get(backgroundUrl, | |
| function(data, textStatus, jqXHR) { | |
| $('#session-longer').html("done! next reload in " + interval/1000 + " seconds"); | |
| }); | |
| }, interval); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment