Created
December 23, 2015 05:52
-
-
Save hsw0/ff19806fb83d1e5aa11b to your computer and use it in GitHub Desktop.
Citrix Receiver Session timeout Auto extend
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 Citrix Receiver Session timeout Auto extend | |
// @namespace http://hsw.syscall.io/ | |
// @version 0.1 | |
// @description 나는 게으르다 | |
// @match http*://*/Citrix/DesktopWeb/site/default.aspx* | |
// @match http*://*/S-VDI/site/default.aspx* | |
// @copyright 2014+, Seungwon Heo <[email protected]> | |
// ==/UserScript== | |
const TIMEOUT_TRIGGER_RE = /timeoutTrigger.aspx$/; | |
const TIMEOUT_CHECK_INTERVAL = 10000; | |
(function() { | |
function checkTimeout() | |
{ | |
if (!unsafeWindow.alerted) | |
{ | |
//console.debug('not alerted yet'); | |
return; | |
} | |
var feedbackLink = document.querySelector('div#feedbackArea a'); | |
if (!feedbackLink || !TIMEOUT_TRIGGER_RE.test(feedbackLink.href)) | |
{ | |
//console.debug('no timeout feedback link'); | |
return; | |
} | |
feedbackLink.click(); | |
//console.debug('timeout reset.'); | |
} | |
setInterval(checkTimeout, TIMEOUT_CHECK_INTERVAL); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment