Skip to content

Instantly share code, notes, and snippets.

@hsw0
Created December 23, 2015 05:52
Show Gist options
  • Save hsw0/ff19806fb83d1e5aa11b to your computer and use it in GitHub Desktop.
Save hsw0/ff19806fb83d1e5aa11b to your computer and use it in GitHub Desktop.
Citrix Receiver Session timeout Auto extend
// ==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 <hsw@syscall.io>
// ==/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