Created
June 2, 2021 09:56
-
-
Save Khoulaiz/023f2eaad130e5d63383d5776c06c7a3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// ==UserScript== | |
// @name Amazon Prevent language switch away from German | |
// @description Some amazon urls will change your language settings. Only use german versions | |
// @namespace https://sahlbach.com/misc/greasemonkey/ | |
// @match https://*.amazon.de/-/*/dp/* | |
// @exclude https://*.amazon.de/-/de/dp/* | |
// @run-at document-start | |
// @version 1 | |
// @grant none | |
// @icon https://www.amazon.com/favicon.ico | |
// ==/UserScript== | |
var current_url = document.URL; | |
var new_url = current_url.replace(/\.amazon\.de\/-\/..\/dp\//, '.amazon.de/-/de/dp/') | |
console.log("replace url to "+new_url) | |
location.replace(new_url); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment