diff --git a/popup.js b/popup.js index 3e622f8..807f2b5 100644 --- a/popup.js +++ b/popup.js @@ -8,6 +8,11 @@ document.addEventListener('DOMContentLoaded', async () => { const videoTitle = document.getElementById('video-title'); const videoUrl = document.getElementById('video-url'); + // Config button click handler (needs to work regardless of page) + configBtn.addEventListener('click', () => { + chrome.tabs.create({ url: chrome.runtime.getURL('options.html') }); + }); + // Check if we're on YouTube const [tab] = await chrome.tabs.query({ active: true, currentWindow: true }); @@ -134,11 +139,6 @@ document.addEventListener('DOMContentLoaded', async () => { } }); - // Config button click handler - configBtn.addEventListener('click', () => { - chrome.runtime.openOptionsPage(); - }); - function showStatus(message, type) { status.textContent = message; status.className = `status ${type}`;