您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Changes the layout of Wikipedia to the old version
当前为
- // ==UserScript==
- // @name Old Wikipedia Layout
- // @namespace http://melashri.net/wikipedia
- // @version 0.2
- // @description Changes the layout of Wikipedia to the old version
- // @author Mohamed Elashri
- // @match https://*.wikipedia.org/*
- // @run-at document-start
- // @grant none
- // @homepage https://github.com/MohamedElashri/old_wikipedia_layout
- // @license MIT
- // ==/UserScript==
- (function() {
- 'use strict';
- var currentURL = window.location.href;
- var questionMarkIndex = currentURL.indexOf('?');
- var hashIndex = currentURL.indexOf('#');
- if(currentURL.includes("useskin=vector")===false){
- if(questionMarkIndex !== -1){
- if(hashIndex !== -1){
- window.location.replace (currentURL.substring(0, hashIndex) + "&useskin=vector" + currentURL.substring(hashIndex));
- }
- else{
- window.location.replace (currentURL + "&useskin=vector");
- }
- }
- else if(hashIndex !== -1){
- window.location.replace (currentURL.substring(0, hashIndex) + "?useskin=vector" + currentURL.substring(hashIndex));
- }
- else{
- window.location.replace (currentURL + "?useskin=vector");
- }
- }
- })();