Script with @run-at document-start will be executed twice #2371

Closed
Infocatcher opened this Issue Mar 5, 2016 · 3 comments

Projects

None yet

2 participants

@Infocatcher

Testcase: https://gist.github.com/Infocatcher/1243f295ca93c94160ec
Install: https://gist.githubusercontent.com/Infocatcher/1243f295ca93c94160ec/raw/document-start.user.js
(and then open about:blank?UserScripts/test - should appear only one +)

// ==UserScript==
// @name        about:blank?UserScripts/test
// @namespace   dev/null
// @include     about:blank?UserScripts/test
// @run-at      document-start
// @version     1
// @grant       none
// ==/UserScript==

console.log("test: " + document.readyState);
document.body.appendChild(document.createTextNode("+"));

Tested with Greasemonkey 3.7, 3.8beta2 (Firefox 44.0.2).

@arantius arantius added this to the 3.8 milestone Apr 18, 2016
@arantius
Collaborator

Fix merged.

@arantius arantius closed this Apr 18, 2016
@arantius
Collaborator

This should be fixed in build 3.8beta3; confirmation would be helpful.

https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/versions/3.8beta3

@Infocatcher

Confirmed, looks fixed for me with GM 3.8beta3 too.
Here I've tested with custom build from master branch: #2372 (comment)
Thanks again. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment