Greasy Fork is available in English.
自定义的相关网站自动跳转
当前为
// ==UserScript==
// @name 指定网站跳转
// @description 自定义的相关网站自动跳转
// @namespace http://greasyfork.icu/zh-CN/scripts/372716
// @version 0.2
// @author lqzh
// @copyright lqzh
// @include http*://eslint.org/*
// @grant none
// ==/UserScript==
const list = [{
o: "eslint.org",
r: "cn.eslint.org",
}];
(function () {
'use strict';
let host = location.host;
for (let i = 0; i < list.length; i++) {
let site = list[i];
if (host == site.o) {
location.href = location.protocal + site.r + location.pathname + location.search;
break;
}
}
})();