Step to reproduce
test1.user.js
// ==UserScript==
// @name Test collision 1
// @namespace userscript
// @license MIT
// @match https://example.com/*
// @version 1.0
// @author esterTion
// @run-at document-end
// @description
// ==/UserScript==
function collideName() {
alert('script 1')
}
setTimeout(() => {
collideName()
}, 1000)
test2.user.js
// ==UserScript==
// @name Test collision 2
// @namespace userscript
// @license MIT
// @match https://example.com/*
// @version 1.0
// @author esterTion
// @run-at document-end
// @description
// ==/UserScript==
function collideName() {
alert('script 2')
}
setTimeout(() => {
collideName()
}, 1000)
Navigate to https://example.com
Expected behaviour
Two alert boxs with script 1 and script 2 respectively pops up
Current behaviour
Two alert boxs with either script 1 or script 2 pops up twice, which one exactly is random
Side note
This can be prevented by wrapping all code inside (async function() { ... })(), but it is definitely frustrating
when code works in other user script manager randomly stops working half the time here
Step to reproduce
test1.user.jstest2.user.jsNavigate to https://example.com
Expected behaviour
Two alert boxs with
script 1andscript 2respectively pops upCurrent behaviour
Two alert boxs with either
script 1orscript 2pops up twice, which one exactly is randomSide note
This can be prevented by wrapping all code inside
(async function() { ... })(), but it is definitely frustratingwhen code works in other user script manager randomly stops working half the time here