Greasy Fork is available in English.
shooshoo
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.greasyfork.icu/scripts/547936/1652397/shoo-2.js
// ==UserScript==
// @name shoo-2
// @namespace http://tampermonkey.net/
// @version 0.2.3
// @description shooshoo
// @author moomoo
// @match https://splix.io/
// @icon https://avatars.githubusercontent.com/u/189983996
// @grant none
// @run-at document-start
// ==/UserScript==
await(async function () {
const currentVersion = '0.2.3'
const cacheBust = Math.floor(Date.now()/(60*1000)) // 60s
const latest = (await (await fetch(`https://update.greasyfork.icu/scripts/547936/shoo-2.js?v=${cacheBust}`)).text()) //refer to itself without version
const match = latest.match(/@version\s+([0-9]+\.[0-9]+\.[0-9]+)/);
const isLatestVersion = match && match[1] === currentVersion;
if (isLatestVersion){
console.log('0.2.3');
// main code here
} else {
console.log('recurse to latest version');
await (new Function("return (async () => { " + latest + " })()"))();
}
})()