您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Use the old Arch Linux wiki skin.
// ==UserScript== // @name Arch Wiki old skin. // @version 1.0.1 // @description Use the old Arch Linux wiki skin. // @author Xyne // @match *://wiki.archlinux.org/* // @namespace https://bbs.archlinux.org/viewtopic.php?id=272800 // @license GPL // ==/UserScript== // Update the location's query parameters from a dictionary. function updateQueryStringParameters(parameters) { return window.location.protocol + "//" + window.location.host + window.location.pathname + '?' + parameters.toString() + window.location.hash ; } // Add the expected query parameter if it is missing and redirect. try { var query_params = new URLSearchParams(window.location.search); const key = 'useskinversion' const value = '1' if (! (query_params.has(key))) { query_params.set(key, value); url = updateQueryStringParameters(query_params); console.log('redirecting to ' + url); document.location = url; } } catch (e) {}