Auto-WikiLang (AWL)

An automatic wikipedia language changer! Auto-WikiLang (AWL) is a small script that automatically changes wikipedia's and wiktionary's language to your language. If you have any errors or suggestions, please contact me at cyanide711(at)gmail(dot)com

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Auto-WikiLang (AWL)
// @namespace    http://www.greasyfork.org/
// @version      0.5.1
// @description  An automatic wikipedia language changer! Auto-WikiLang (AWL) is a small script that automatically changes wikipedia's and wiktionary's language to your language. If you have any errors or suggestions, please contact me at cyanide711(at)gmail(dot)com
// @author       Jack Gaynor

// @match        https://*.wikipedia.org/*
// @exclude      https://en.wikipedia.org/*
// Change the above to fit your language

// @match        https://*.wiktionary.org/*
// @exclude      https://en.wiktionary.org/*
// Change the above to fit your language

// Now works with wiktionary!

// @grant        none
// @icon         https://i.imgur.com/A75OqHr.png
// ==/UserScript==

if (location.hostname.includes("wikipedia.org")){
    location.hostname = "en.wikipedia.org"; //change me to your language
}
if (location.hostname.includes("wiktionary.org")){
    location.hostname = "en.wiktionary.org"; //change me to your language
}