Wikipedia Old Design

Forces the old design on Wikipedia, because the new design is awful

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Wikipedia Old Design
// @namespace    https://ksir.pw
// @version      1.0.1
// @description  Forces the old design on Wikipedia, because the new design is awful
// @author       Kain (ksir.pw)
// @match        *://*.wikipedia.org/*
// @exclude      *://*.wikipedia.org/
// @homepage     https://greasyfork.org/en/scripts/459165-wikipedia-old-design
// @supportURL   https://greasyfork.org/en/scripts/459165-wikipedia-old-design/feedback
// @license      MIT
// @icon         data:image/gif;base64,R0lGODlhEAAQAMIDAAAAAIAAAP8AAP///////////////////yH5BAEKAAQALAAAAAAQABAAAAMuSLrc/jA+QBUFM2iqA2ZAMAiCNpafFZAs64Fr66aqjGbtC4WkHoU+SUVCLBohCQA7
// @grant        none
// @run-at       document-start
// ==/UserScript==

const url = new URL(window.location.href);

// Update current page
if(url.toString().indexOf('useskin') === -1){
  url.searchParams.set('useskin', 'vector');
  location.replace(url);
}

window.onload = () => {
  // Add param to links on the page
  for(const a of document.getElementsByTagName('a')) {
    // Ignore external links
    if(a.href.indexOf('wikipedia.org') === -1) continue;
    let href = new URL(a.href);
    href.searchParams.set('useskin', 'vector');
    a.href = href;
  }
}