Skip to content

Instantly share code, notes, and snippets.

@Khoulaiz
Created June 2, 2021 09:56
Show Gist options
  • Save Khoulaiz/023f2eaad130e5d63383d5776c06c7a3 to your computer and use it in GitHub Desktop.
Save Khoulaiz/023f2eaad130e5d63383d5776c06c7a3 to your computer and use it in GitHub Desktop.
// ==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