// ==UserScript== // @name Soybooru approved:no auto-refresh // @namespace http://tampermonkey.net/ // @version 0.1 // @description Refreshes the soybooru approved:no list every 5 seconds // @author You // @match https://soybooru.com/post/list/approved:no/* // @match https://soybooru.com/post/list/approved%3Ano/* // @grant none // @run-at document-end // ==/UserScript== (function() { 'use strict'; // ──────────────────────────────────────────────── // CONFIG // ──────────────────────────────────────────────── const REFRESH_INTERVAL_SECONDS = 5; // ──────────────────────────────────────────────── // LOGIC // ──────────────────────────────────────────────── const delayMs = REFRESH_INTERVAL_SECONDS * 1000; console.log(`[Soybooru AutoRefresh] Page will reload every ${REFRESH_INTERVAL_SECONDS} seconds`); const indicator = document.createElement('div'); indicator.style.position = 'fixed'; indicator.style.top = '8px'; indicator.style.right = '8px'; indicator.style.background = 'rgba(0,0,0,0.7)'; indicator.style.color = '#0f0'; indicator.style.padding = '4px 8px'; indicator.style.fontFamily = 'monospace'; indicator.style.fontSize = '11px'; indicator.style.zIndex = '999999'; indicator.style.borderRadius = '3px'; indicator.textContent = `Auto-refresh every ${REFRESH_INTERVAL_SECONDS}s`; document.body.appendChild(indicator); setInterval(() => { console.log("[Soybooru AutoRefresh] Reloading now..."); window.location.reload(); }, delayMs); })();