You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have noticed my script can no longer detect when there is no back histry button on the page and it turned out that history.length returns 2 for userscripts when from browser console it returns 1 if the inject mode setting is turned to instant and the sandbox is JavaScript and the run at is document-start
example script:
// ==UserScript==// @name New Userscript// @namespace http://tampermonkey.net/// @version 2025-02-28// @description try to take over the world!// @author You// @match https://*/*// @icon https://www.google.com/s2/favicons?sz=64&domain=github.com// @grant none// @sandbox JavaScript// @run-at document-start// ==/UserScript==(function(){'use strict';// Your code here...console.error("history length: "+history.length);})();
result:
TM: 5.3.3
FireFox: 135.0.1 (64-bit)
Win: 10
The text was updated successfully, but these errors were encountered:
I have noticed my script can no longer detect when there is no back histry button on the page and it turned out that
history.length
returns 2 for userscripts when from browser console it returns 1 if the inject mode setting is turned to instant and the sandbox is JavaScript and the run at is document-startexample script:
result:
TM: 5.3.3
FireFox: 135.0.1 (64-bit)
Win: 10
The text was updated successfully, but these errors were encountered: