您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Redirect m.thepaper.cn URLs to www.thepaper.cn with correct format
// ==UserScript== // @name 从m.thepaper.cn转到www.thepaper.cn // @version 0.1 // @description Redirect m.thepaper.cn URLs to www.thepaper.cn with correct format // @author bingqiang // @match https://m.thepaper.cn/* // @grant none // @namespace https://gf.qytechs.cn/users/1346278 // ==/UserScript== (function() { 'use strict'; // Redirect function function redirectUrl() { var currentUrl = window.location.href; // Check if the URL starts with m.thepaper.cn and contains numbers if (currentUrl.startsWith('https://m.thepaper.cn/')) { // Extract ID (digits) from the URL var regex = /(\d+)/; var match = currentUrl.match(regex); if (match && match[1]) { var id = match[1]; var newUrl = 'https://www.thepaper.cn/newsDetail_forward_' + id; // Redirect to the new URL window.location.replace(newUrl); } } } // Check if the URL starts with m.thepaper.cn if (window.location.hostname === 'm.thepaper.cn') { redirectUrl(); } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址