What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Help with a small GM script

Help with a small GM script
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
O.P. Help with a small GM script
So I am getting really frustrated with GM and it's inability for me to grasp what is happening LOL.

Here is the script in it's entirety:

Javascript code:
(function () {
    for (var i in document.forms) {
        if (document.forms[i].name === 'lf') {
            getId('ttAuthUID').value = '';
            getId('ttAuthPWD').value = '';
            getId('submitButton').click();
        }
    }
    setInterval("isTimedOut()", 10000);
       
    function getId(id) { return document.getElementById(id); }
   
    function isTimedOut() {
        if (getId('overlaymessage').style.display == 'block')
            window.location.reload(false);
    }
 
})();


Basically the script auto logs me in to my works issue tracking software (works fine), now after a bit of time the software will auto log you out. The isTimedOut function simply checks to see if the popup message is displayed and should reload the page. However using setInterval I get isTimedOut() is not defined... I cannot seem to figure out why!

Ultimately it would be nice to gain access to the variable that deals with the timeouts but I cannot seem to figure out how. Still new to GM.

Thanks

Firefox 3.6.16
GM 0.9.2
04-19-2011 02:22 PM
Profile E-Mail PM Find Quote Report
Mike
Elite Member
*****

Avatar
Meet the Spam Family!

Posts: 2795
Reputation: 48
31 / Male / Flag
Joined: Mar 2003
Status: Online
RE: Help with a small GM script
Try setInterval(function(){isTimedOut();}, 10000);

quote:
Originally posted by matty
Ultimately it would be nice to gain access to the variable that deals with the timeouts but I cannot seem to figure out how. Still new to GM.
unsafeWindow should work, but it's not recommended to use it. Using a location hack should work too.

This post was edited on 04-19-2011 at 02:55 PM by Mike.
YouTube closed-captions ripper (also allows you to download videos!)
04-19-2011 02:46 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On