Last active
August 14, 2019 10:26
-
-
Save Delivator/1c124681d85d0e9046214397ee6aaed3 to your computer and use it in GitHub Desktop.
Amazon Smile redirect
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 Smile redirect | |
// @namespace https://Bgmn.me | |
// @version 0.4 | |
// @description Redirects www.amazon.de & www.amazon.com url to the respective smile.amazon.tdl domain | |
// @author Bgmn.me | |
// @include https://www.amazon.* | |
// @grant none | |
// @homepage https://gist.github.com/Delivator/1c124681d85d0e9046214397ee6aaed3 | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
if (window.location.host.startsWith("www.amazon.") && (window.location.pathname.includes("/gp/") || window.location.pathname.includes("/product/") || window.location.pathname.includes("/dp/") || window.location.pathname.includes("/s?"))) { | |
window.location.href = window.location.href.replace("www.amazon", "smile.amazon"); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment