windows - It's there a way to reload a greasemonkey script? -


Is this a way to reload a script from greasemonkey?

For example: When I work on a specific website, Grisamnaki does the script correctly, but when I change the page (Asp, which I think is in the website), the script to be effective Do not reload ...

How can I solve it? Wrap your Greasemonkey code in the function and then set a document change event-handler to call it.

  / * --- AJAX changes on our Greasemonkey code To "reaffirm", we wrap it in a function and call it on a DOM change event. * / Var zGbl_DOM_ChangeTimer = ''; Var bGbl_ChangeEventListenerInstalled = false; / * --- After loading the documents, run everything. Race conditions and excessive "churn" avoids * / Window.addEventListener ("load", main verb, wrong); Function Menation () {if (! BGbl_ChangeEventListenerInstalled) {bGbl_ChangeEventListenerInstalled = true; / * --- Notes: (1) If AJAX loads for a specific node, then add this listener instead of the whole body. (2) iFrames may need different handling. * / Document.addEventListener ("DOMSubtreeModified", Handle DOM_ChangeWithDelay, Incorrect); } // --- ******************************************************************************************* **************************************************************************************************** **************************************************************************************************** **************** *************************************************************** **************************************************************************************************** **************************************************************************************************** ************ * / If (type zGbl_DOM_ChangeTimer == "number") {explicit timed out (zGbl_DOM_ChangeTimer); ZGbl_DOM_ChangeTimer = ''; } ZGbl_DOM_ChangeTimer = setTimeout (function () {MainAction ();}, 222); // - 222 milliseconds}  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -