// ==UserScript== // @name OuterEmpires – Preview Overlay // @namespace http://tamperpermonkey.net/ // @version 1.0 // @description Shows a floating mini-preview of your Outer Empires game tab on any other tab. // @author You // @match *://*/* // @exclude https://game.dev.outerempires.net/* // @grant none // ==/UserScript== (function () { 'use strict'; const STORAGE_KEY = 'outerempires_preview_snapshot'; const POLL_MS = 3000; // how often to check for a new snapshot const PREVIEW_WIDTH = 280; const STALE_THRESHOLD = 30000; // hide if snapshot is older than 30s // --- Build the floating widget --- const wrapper = document.createElement('div'); wrapper.id = 'oe-preview-wrapper'; Object.assign(wrapper.style, { position: 'fixed', bottom: '20px', right: '20px', width: PREVIEW_WIDTH + 'px', zIndex: '2147483647', fontFamily: 'system-ui, sans-serif', userSelect: 'none', transition: 'opacity 0.2s ease', }); wrapper.innerHTML = `