/
crocouser
/
streamlive-EXT
Обзор
Документация
Войти
/
crocouser
/
streamlive-EXT
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
master
background.js
33 строки
949 B
TwixoffStudio
Create: options.js, splash.html, splash.js, unavailable.html, icon-128.png, icon-16.png, icon-32.png, icon-48.png, background.js, content.js, manifest.json, options.html
06 авг 2026, 17:12
Верифицирован
06 авг 2026, 17:12
954e675
Код
Авторство
О чём код?
const DEFAULT_URL = 'https://streamliveru.web1337.net/?source=extension'; const SPLASH = chrome.runtime.getURL('splash.html'); async function openApp() { try { await chrome.windows.create({ url: SPLASH, type: 'popup', state: 'maximized', focused: true }); } catch (e) { try { await chrome.tabs.create({ url: SPLASH, active: true }); } catch (e2) {} } } chrome.action.onClicked.addListener(() => { openApp(); }); chrome.runtime.onMessage.addListener((msg, _s, sendResponse) => { if (msg && msg.type === 'COINS_GET') { chrome.storage.local.get({ coins: 0, lastClaim: '', promo: '' }, (d) => sendResponse(d)); return true; } if (msg && msg.type === 'COINS_SET') { chrome.storage.local.set(msg.patch || {}, () => sendResponse({ ok: true })); return true; } if (msg && msg.type === 'PING') { sendResponse({ ok: true, version: '1.2.0' }); return true; } return false; });