Amazon.com auto redirect mobile to desktop version

Automatically redirect from mobile version to desktop version of the page.

当前为 2018-01-09 提交的版本,查看 最新版本

// ==UserScript==
// @id             amazon.com_mobile2desktop
// @name           Amazon.com auto redirect mobile to desktop version
// @version        1.3
// @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
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))
  window.location.replace(window.location.toString().replace(/^(https?:\/\/)([^\/]+)\/(.*)/ig, "$1smile.amazon.com/$3"));

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址