您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Classes for your scripts
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.greasyfork.icu/scripts/389765/1090053/CommonUtils.js
// @require http://greasyfork.icu/scripts/389765-common-utils/code/CommonUtils.js?version=XXX
See last available version on the GreasyFork homepage
let CacheInstance = new SimpleCache();
let result = null;
if (CacheInstance.has('key')) {
result = CacheInstance.get('key');
} else {
result = await $.ajax('url');
CacheInstance.set('key', result);
}
let SettingsInstance = new Settings('script name', {'default':'settings'});
With jQuery:
$(window).on('beforeunload', () => SettingsInstance.save() );
Author homepage: http://anton.shevchuk.name/
Script homepage: https://github.com/AntonShevchuk/common.utils
GreasyFork: http://greasyfork.icu/uk/scripts/389765-common-utils