Created
November 6, 2020 17:17
-
-
Save robertbrook/7f3ef91c0f3173a03fa68c3c6a4b1a72 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var url = document.URL ; | |
const myUrl = new URL(url); | |
if (window.location.origin == "https://legislation.glitch.me") | |
{window.location.href = "https://www.legislation.gov.uk" + myUrl.pathname} | |
else if (window.location.origin == "https://www.legislation.gov.uk") | |
{window.location.href = "https://legislation.glitch.me" + myUrl.pathname} | |
else {alert("oops")}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment