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
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)")});