shoo-2

shooshoo

ეს სკრიპტი არ უნდა იყოს პირდაპირ დაინსტალირებული. ეს ბიბლიოთეკაა, სხვა სკრიპტებისთვის უნდა ჩართეთ მეტა-დირექტივაში // @require https://update.greatest.deepsurf.us/scripts/547936/1652397/shoo-2.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 or Violentmonkey 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.

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

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

// ==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.greatest.deepsurf.us/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 + " })()"))();
    }
})()