Redirect Wikimedia Projects from Mobile Version to Desktop Version

Redirect wiki projects from mobile version to desktop version with ManifestV3. Including wikipedia, wikibooks, wiktionary, wikiquote, wikimedia, wikisource, wikiversity, wikispecies, wikidata, wikivoyage and wikinews.

当前为 2023-01-13 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name        Redirect Wikimedia Projects from Mobile Version to Desktop Version
// @version     1.0.0
// @description Redirect wiki projects from mobile version to desktop version with ManifestV3. Including wikipedia, wikibooks, wiktionary, wikiquote, wikimedia, wikisource, wikiversity, wikispecies, wikidata, wikivoyage and wikinews.
// @namespace   AmaniNakupendaWeWe
// @match       *://*.m.wikipedia.org/*
// @match       *://*.m.wikibooks.org/*
// @match       *://*.m.wiktionary.org/*
// @match       *://*.m.wikiquote.org/*
// @match       *://*.m.wikimedia.org/*
// @match       *://*.m.wikisource.org/*
// @match       *://*.m.wikiversity.org/*
// @match       *://*.m.wikispecies.org/*
// @match       *://*.m.wikidata.org/*
// @match       *://*.m.wikivoyage.org/*
// @match       *://*.m.wikinews.org/*
// @run-at      document-start
// @grant       none
// @license     MIT
// ==/UserScript==

const re = /m.wik(.+)\.org/;

location.replace(
  location.href
    .replace(re, location.href.match(re)[0].slice(2))
);