New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setTimeout broken again in 1.0 #1620
Comments
You're going to need to be much more specific; works fine for me. Provide a link to an exact script, the shorter the better, that doesn't work for you. (Plus, setTimeout is not a Greasemonkey API, so |
Okay, here is a sample code: // ==UserScript==
// @name test
// @namespace server.gvn.cz/~mp890318
// @include https://github.com/greasemonkey/greasemonkey/issues/1620
// @grant GM_util
// @grant GM_util.timeout
// @version 1
// ==/UserScript==
alert("test1");
setTimeout('alert("test2")', 500); The string "test1" is shown, whereas "test2" is never shown. |
@peci1, your test script would probably work if you used However, that is a poor way to use A more proper usage, will also work irregardless of the //-- Traditional
setTimeout ( function () {
alert ("test2");
}, 500
);
//-- Okay for most modern browsers (certainly for Greasemonkey)
setTimeout (alert, 500, "test2"); |
The issue originally from #1318 is indeed happening in the Otherwise, in 15, I am indeed seeing strange behavior that I've yet to 100% explain. |
// ==UserScript==
// @name _del5
// @namespace _pc
// @include https://github.com/greasemonkey/greasemonkey/issues/*
// @grant none
// ==/UserScript==
setTimeout('alert("test2")', 500); works fine for me. |
Seems to be a little bit weird. The script from @BrockA works fine. My script works well on most pages (after changing the include clause), but when I run it a lot of times, then the second alert stops working. Even duplicating the tab with bad behavior helps, the duplicated page shows two alerts. Most of my setTimeout statements have started to work as expected yesterday (but I don't know of a recent update to FF or GM). |
Test script: https://gist.github.com/3656920 Behaves as expected (setTimeout broken after alert); the bug from issue #1318 is back in the grant-none mode. If I edit If I edit the setTimeout lines, then in the legacy case I see one global-model alert, then two tab-modal alerts (not exactly broken, but admittedly weird; this will go away in Firefox 16). If I then go back to grant none, I see one tab-modal alert, and then still brokenness as expected. |
hello |
@AYOUBZER I don't really understand what you mean, but it sounds as though you were talking about a userscript, not the extension itself. In that case, this is not the place to ask for advice. |
Hello, bad news... setTimeout() ceased working for me after update to 1.0
I tried setting:
@grant none
@grant GM_util
@grant GM_util.timeout
@grant setTimeout
none of which work.
Thanks for any help ;)
The text was updated successfully, but these errors were encountered: