How to override a JavaScript value with greasemonkey

greasemonkey

I usually have to visit a website:

https://xyz.asd.com/maximo/ui/maximo.jsp?sc=4325286581&event=loadapp&value=incident

that contains the following line in it's HTML code:

SESSION_TIMEOUT = 1800;//in seconds.

I need to change this string to ex.:

SESSION_TIMEOUT = 1800000;//in seconds.

Greasmonkey can do this. But how? I kept googling for hours, but the original line is untouched… Can someone help me?

Best Answer

// ==UserScript==
// @name          Script Name Here
// @namespace     http://www.site.com/your-personal-namespace
// @description   An Greasemonkey script that changes the session timeout value
// @include       https://xyz.asd.com
// ==/UserScript==
window.SESSION_TIMEOUT = 1800000;

?

Related Question