Greasemonkey/Tampermonkey script to redirect to doubly modified URL
问题 The target page has the URL: ouo.io/tLnpEc.html And I want to change the URL to: ouo.press/tLnpEc That is: .io to .press and remove .html . I already have this but it ain't working (It redirects to ouo.press but still doesn't remove .html): var url = window.location.host; if (url.match("//ouo.io") === null) { url = window.location.href; if (url.match("//ouo.io") !== null){ url = url.replace("//ouo.io", "//ouo.press"); } else if (url.match("/*.html") !== null){ url = url.replace("/*.html", " "