```js
// ==UserScript==
// @
name Mobile to Web Redirect
// @
namespace http://tampermonkey.net/// @
version 1.0
// @
description Automatically redirect from mobile URLs to web page URLs
// @
match http://*/*
// @
match https://*/*
// @
grant none
// ==/UserScript==
(function() {
'use strict';
// Get the current URL
let currentURL = window.location.href;
// Check if the URL contains "m." or "mobile."
if (currentURL.includes("m.") || currentURL.includes("mobile.")) {
// Remove "m." or "mobile." from the URL
let webURL = currentURL.replace("m.", "").replace("mobile.", "");
// Redirect to the web page URL
window.location.href = webURL;
}
})();
```
Claude Opus 写的