Skip to content

Globals not defined on Greasemonkey #8

@rossjrw

Description

@rossjrw

When using Greasemonkey, globals (e.g. OZONE) are not defined due to its sandboxing behaviour.

@emmiegit suggested moving code into the browser context by adding it to a script tag, suggested https://github.com/scpwiki/user-info-script/blob/main/user-info.user.js as example. I am a bit confused on why this works, but that's why I'm writing an issue instead of just doing it

Simple replace of window for unsafeWindow does not work - no permission to access properties of DOM objects, userscript sandbox acts like a cross domain iframe

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions