您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automatically redirect from mobile version to desktop version of the page.
- // ==UserScript==
- // @id amazon.com_mobile2desktop
- // @name Amazon.com auto redirect mobile to desktop version
- // @version 1.3.2
- // @namespace V@no
- // @author V@no
- // @description Automatically redirect from mobile version to desktop version of the page.
- // @include http://amazon.com/*
- // @include http://www.amazon.com/*
- // @include https://amazon.com/*
- // @include https://www.amazon.com/*
- // @grant none
- // @run-at document-start
- // ==/UserScript==
- //redirect mobile to desktop
- (function()
- {
- let log = console.log.bind(console);
- if (location.pathname.match(/^\/gp\/aw\//i))
- {
- window.location.replace(window.location.toString().replace(/^(https?:\/\/(www\.)?amazon\.com\/)gp\/aw\/(d\/)?(.*)/ig, "$1dp/$4"));
- }
- else
- {
- //redirect to charity amazon
- if (!location.hostname.match(/smile\.amazon\.com/i) && location.href.indexOf("signin") == -1)
- {
- let smile = window.location.toString().replace(/^(https?:\/\/)([^\/]+)\/(.*)/ig, "$1smile.amazon.com/$3");
- if (location.search.indexOf("pldnSite") == -1)
- {
- log("Redirecting to smile.amazon.com");
- window.location.replace(smile);
- }
- else
- {
- log("Can't redirect to smile.amazon.com due to pldnSite")
- }
- }
- }
- })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址