Initial Phoenix analyzer

This commit is contained in:
Mikei386
2026-06-02 20:56:19 +02:00
commit e499bac928
62 changed files with 28893 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
// Aktiviert den bestehenden Tab mit Ziel-URL (ohne Reload). Falls nicht offen, wird er geöffnet.
function activateOrCreate(url) {
chrome.tabs.query({}, tabs => {
const t = tabs.find(tt => tt.url && tt.url.startsWith(url));
if (t) { chrome.tabs.update(t.id, {active: true}); }
else { chrome.tabs.create({url}); }
});
}
chrome.runtime.onMessage.addListener((msg, _sender, sendResponse) => {
if (msg && msg.cmd === 'toggle') {
if (msg.from === 'volumio') activateOrCreate('http://localhost:8088/');
else activateOrCreate('http://localhost:3000/');
sendResponse({ok:true});
}
});