Skip to content

Instantly share code, notes, and snippets.

@Sequoia
Created September 28, 2012 21:12
Show Gist options
  • Save Sequoia/3802094 to your computer and use it in GitHub Desktop.
Save Sequoia/3802094 to your computer and use it in GitHub Desktop.
keep jira session active
// ==UserScript==
// @name Keep the page open
// @namespace http://use.i.E.your.homepage/
// @version 0.1
// @description enter something useful
// @match https://ssp.ptc.com/jira/*
// @copyright 2012+, You
// ==/UserScript==
setInterval(function(){
//^.*ssp.ptc.com\/(wiki|jira).*$ to match jira & wiki
//@TODO find a confluence api endpoint that serves just a small bit of json
var request = new XMLHttpRequest();
request.open('GET', '/jira/rest/quickedit/1.0/userpreferences/create', false);
request.send(); // because of "false" above, will block until the request is done
// and status is available. Not recommended, however it works for simple cases.
if (request.status === 200) {
console.log('jira pinged');
}
},
60000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment