Last active
October 3, 2023 06:45
-
-
Save oliviernt/31e956c611c5a91f5ea3a9c909bd1539 to your computer and use it in GitHub Desktop.
Bookmarklet to prevent NBA.com redirect to local nba site
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
// on https://nba.com/standings (or some path below the TLD where you normally don't get redirected) | |
// execute: | |
(() => { | |
const cookie = "gr=franceuw"; // you might need to change the cookie value if in another country | |
document.cookie = cookie; | |
const div = document.createElement("div"); | |
div.textContent = `Cookie set: ${cookie}`; | |
div.style.background = "white"; | |
div.style.border = "1px solid limegreen"; | |
div.style["border-radius"] = ".8rem" | |
div.style.padding = ".8rem"; | |
div.style.position = "absolute"; | |
div.style.top = 0; | |
div.style.right = 0; | |
div.style["z-index"] = 99999; | |
document.body.firstChild.prepend(div); | |
setTimeout(() => div.remove(), 3000); | |
})(); |
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
(()=>{const cookie="gr=franceuw";document.cookie=cookie;const div=document.createElement("div");div.textContent=`Cookie set: ${ cookie }`;div.style.background="white";div.style.border="1px solid limegreen";div.style["border-radius"]=".8rem";div.style.padding=".8rem";div.style.position="absolute";div.style.top=0;div.style.right=0;div.style["z-index"]=99999;document.body.firstChild.prepend(div);setTimeout(()=>div.remove(),3000)})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment