Mobile 1668 to Desktop

Auto Redirect from mobile 1668 to desktop

  1. // ==UserScript==
  2. // @name Mobile 1668 to Desktop
  3. // @namespace https://www.reddit.com/user/RobotOilInc
  4. // @version 0.1.1
  5. // @description Auto Redirect from mobile 1668 to desktop
  6. // @author RobotOilInc
  7. // @match https://m.1688.com/offer/*.html*offerId=*
  8. // @match https://m.1688.com/offer/*.html*
  9. // @license MIT
  10. // @homepageURL https://gf.qytechs.cn/en/scripts/430178-mobile-1668-to-desktop
  11. // @supportURL https://gf.qytechs.cn/en/scripts/430178-mobile-1668-to-desktop
  12. // @run-at document-start
  13. // @icon https://img.alicdn.com/tfs/TB1uh..zbj1gK0jSZFuXXcrHpXa-16-16.ico?x-icon
  14. // ==/UserScript==
  15.  
  16. /* jshint esversion: 6 */
  17.  
  18. // Regex to grab offerId if not in URL
  19. const regex = /https?:\/\/m\.1688\.com\/offer\/(.*)\.html/i;
  20.  
  21. // Get the offerId
  22. let offerId = (new URLSearchParams(window.location.search)).get('offerId');
  23. if (offerId == null) {
  24. offerId = regex.exec(window.location.href)[1]
  25. }
  26.  
  27. window.location.href = `https://detail.1688.com/offer/${offerId}.html`;

QingJ © 2025

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