Kerwin612

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

Script này sẽ không được không được cài đặt trực tiếp. Nó là một thư viện cho các script khác để bao gồm các chỉ thị meta // @require https://update.greasyfork.org/scripts/404294/810055/Kerwin612.js

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

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.

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

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

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!)

Tác giả
ileler
Phiên bản
0.1
Đã tạo
29-05-2020
Đã cập nhật
29-05-2020
Kích thước
3 KB
Giấy phép
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'
);