Created
December 4, 2020 21:53
-
-
Save zaneneuschuler/e920b345fc990cab38070f3e25935763 to your computer and use it in GitHub Desktop.
Amazon link shortener
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
javascript: (function () { | |
let url = window.location.toString(); | |
let splitUrl = url.split("/"); | |
if (splitUrl[2].includes("amazon") && splitUrl[3] != "dp") { | |
goodId = splitUrl[5].split("?")[0]; | |
window.location = "https://"+splitUrl[2] + "/dp/"+goodId; | |
} | |
else{ | |
alert("URL is already either minimized, or you're not on Amazon."); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment