Kerwin612

用户脚本的基础,包含读取配置的功能;利用此脚本,用户可以忽略配置相关的代码;直接定义功能就可以;

Dieses Skript sollte nicht direkt installiert werden. Es handelt sich hier um eine Bibliothek für andere Skripte, welche über folgenden Befehl in den Metadaten eines Skriptes eingebunden wird // @require https://update.greatest.deepsurf.us/scripts/404294/810055/Kerwin612.js

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Autor
ileler
Version
0.1
Erstellt am
29.05.2020
Letzte Aktualisierung
29.05.2020
Größe
3,16 KB
Lizenz
MIT
//默认配置,如有配置项,将按照以下格式定义配置
config.configKey = configVal

//方法模板,按以下格式定义方法
func(
    //startup: url匹配上时就会执行的方法,无须返回值,仅执行一次
    (ctx) => {
    }, 
    //ready: url匹配上时就会执行的方法,返回bool类型的值,每30ms执行一次,直至此方法返回true后就不再执行
    (ctx) => {
        return true;
    }, 
    //run: url匹配上且以上的ready方法返回true后执行的方法,无须返回值,仅执行一次
    (ctx) => {
    },
    //URL匹配项,可定义多个;当URL匹配时才执行上面的方法;当URL为空或未定义时,上述方法为默认执行的方法
    'url1','url2','url3'
);