重定手机版网页去网页版网页

澎湃新闻,喜马拉雅,界面新闻,网易新闻

当前为 2024-11-03 提交的版本,查看 最新版本

// ==UserScript==
// @name         重定手机版网页去网页版网页
// @namespace    https://gf.qytechs.cn
// @version      1.0.0.0
// @description  澎湃新闻,喜马拉雅,界面新闻,网易新闻
// @match        *://m.thepaper.cn/*
// @match        *://m.huxiu.com/*
// @match        *://m.jiemian.com/*
// @match        *://m.ximalaya.com/*
// @match        *://m.dongqiudi.com/*
// @match        *://m.163.com/*
// @match        *://m.stnn.cc/*
// @match        *://m.douban.com/*
// @grant        none
// @run-at       document-start
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // Define a map of mobile to desktop hostnames
    const siteMap = {
        "m.thepaper.cn": "thepaper.cn",
        "m.huxiu.com": "huxiu.com",
        "m.jiemian.com": "jiemian.com",
        "m.ximalaya.com": "www.ximalaya.com",
        "m.dongqiudi.com":"www.dongqiudi.com",
        "m.163.com":"www.163.com",
        "m.stnn.cc":"www.stnn.cc",
        "m.douban.com":"www.douban.com"
    };

    // Check if the current hostname is in the siteMap and redirect if needed
    const desktopHostname = siteMap[location.hostname];
    if (desktopHostname) {
        location.replace(location.href.replace(location.hostname, desktopHostname));
    }
})();

QingJ © 2025

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