您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
redirects to English version of the documentation
当前为
// ==UserScript== // @name PHP.net redirect to english // @namespace https://greasyfork.org/en/scripts/40797-php-net-redirect-to-english // @version 0.3.1 // @description redirects to English version of the documentation // @author adamaru // @match http://php.net/manual/* // @match https://php.net/manual/* // @match https://secure.php.net/manual/* // @grant none // @run-at document-start // ==/UserScript== /* jshint esversion: 6 */ (function() { 'use strict'; const url = window.location.href; const regex = /(https?:\/\/(?:secure\.)?php\.net\/manual\/)([^\/]+)(\/.*)/gm; const match = regex.exec(url); if(!match){ return; } if(match[2] === 'en'){ return; } const newUrl = match[1] + 'en' + match[3]; window.location.replace(newUrl); })();