Skip to content

Need help with a userscript #178

@specter78

Description

@specter78
// ==UserScript==
// @name       Redirect
// @match      *://www.reddit.com/*
// @run-at     document-start
// @noframes
// ==/UserScript==

query = window.location.href.split("www.reddit.com")[1];
window.location.href = "https://libredd.it" + query;

I want the redirect to happen before page load. However, in reality, redirect happens after the page is loaded.

System Information:

macOS version: 12.0.1
Userscripts version: 3.3.1
Safari version: 15.1
Is this issue related to script injection? Yes
Did the test script (pasted above) successfully run on your machine? Yes and No

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions