means that the page is using just plain JS. then window in userscript === window in the page scope If we want to use some special GM_* functions, we have to explicitly @grant the permission for the script to use it (since GM 1.0), one-by-one. Otherwise, those identifiers will be undefined. // ==UserScript== // ... // @grant GM_setValue // @grant GM_getValue // ==/UserScript== If we @grant’ed anything, then window in userscript !== window in the page scope window in userscript is a „safe window”, to separate the privileged and non- privileged execution scope Like a newly created window object, without any alterations or user-defined global variables This is to prevent the access to GM_* functions by the malicious script on a page unsafeWindow in userscript === window in the page scope