// ==UserScript== // @name 移动端链接跳电脑端 // @description 自动将移动端链接跳转为电脑端访问的网页 // @namespace https://github.com/popring/tampermonkey-m2pc // @version 2025-02-17 // @author popring // @match https://m.huxiu.com/* // @match https://m.thepaper.cn/* // @icon https://www.google.com/s2/favicons?sz=64&domain=huxiu.com // @grant none // @license MIT // @downloadURL none // ==/UserScript== (function () { 'use strict'; const map = { 'm.huxiu.com': 'www.huxiu.com', 'm.thepaper.cn': 'www.thepaper.cn', }; const host = location.host; for (const [key, value] of Object.entries(map)) { if (host === key) { location.host = value; return; } } })();