Greasy Fork is available in English.

TamperMonkeyRouter

Router for TamperMonkey scripts

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greasyfork.org/scripts/468396/1203270/TamperMonkeyRouter.js

Aŭtoro
Howardzhangdqs
Versio
0.1
Kreita
2023/06/11
Ĝisdatigita
2023/06/11
Licenco
WTFPL

TamperMonkey Router

Usage:

// Wildcard matching path
window.TamperMonkeyRouter("*/zh-CN/*", () => { console.log("Chinese") });
window.TamperMonkeyRouter("*/zh-??/*", () => { console.log("Chinese (CN/TW/HK/etc)") });

// Regular expression matching path
window.TamperMonkeyRouter(/\/zh-CN\//, () => {console.log("Chinese")});
window.TamperMonkeyRouter(/\/zh-..\//, () => {console.log("Chinese (CN/TW/HK/etc)")});