Tech Script

Автоматически загружает и кэширует скрипт для форума

Versione datata 23/01/2026. Vedi la nuova versione l'ultima versione.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         Tech Script
// @namespace    https://github.com/Amnyambal/brscript
// @version      1.01
// @description  Автоматически загружает и кэширует скрипт для форума
// @author       Amnyambal
// @match        https://forum.blackrussia.online/*
// @grant        none
// @run-at       document-start
// @license      MIT
// ==/UserScript==
 
(()=>{const C={U:'https://raw.githubusercontent.com/Amnyambal/brscript/main/forum-buttons.js?'+Date.now(),T:10000,R:3,D:2000,K:'forum_buttons_cache',DEBUG:!1},L=(...a)=>{C.DEBUG&&console.log('[FL]',...a)},G=()=>{try{const d=GM_getValue(C.K);return d||null}catch{return null}},S=c=>{try{GM_setValue(C.K,{t:Date.now(),c})}catch{}},W=()=>new Promise(r=>{const i=setInterval(()=>window.jQuery&&(clearInterval(i),r()),100)}),F=async(n=1)=>{try{L(n+'/'+C.R);const r=await Promise.race([fetch(C.U),new Promise((_,j)=>setTimeout(()=>j('timeout'),C.T))]);if(!r.ok)throw r.status;const t=await r.text();if(t.includes('<!')||!t.trim())throw'bad';return t}catch(e){if(n<C.R){await new Promise(r=>setTimeout(r,C.D));return F(n+1)}throw e}};(async()=>{try{const c=await F();S(c);await W();Function(c)()}catch{const g=G();g&&g.c?(await W(),Function(g.c)()):console.error('[FL] no net + no cache')}})();window.rFL=()=>location.reload()})();