diff --git a/chrome-extension/background.js b/chrome-extension/background.js deleted file mode 100644 index 4785a23..0000000 --- a/chrome-extension/background.js +++ /dev/null @@ -1,20 +0,0 @@ -// background.js - -// Called when the user clicks on the browser action. -chrome.browserAction.onClicked.addListener(function(tab) { - // get the frontend_url - chrome.storage.sync.get({ - frontend_url: 'http://localhost', - audio_only: false - }, function(items) { - chrome.tabs.query({active: true, currentWindow: true}, function(tabs) { - var activeTab = tabs[0]; - var url = activeTab.url; - if (url.includes('youtube.com')) { - var new_url = items.frontend_url + '/#/home;url=' + encodeURIComponent(url) + ';audioOnly=' + items.audio_only; - chrome.tabs.create({ url: new_url }); - } - }); - }); - -}); \ No newline at end of file diff --git a/chrome-extension/manifest.json b/chrome-extension/manifest.json index 1ecf992..f5f4f79 100644 --- a/chrome-extension/manifest.json +++ b/chrome-extension/manifest.json @@ -1,17 +1,20 @@ { "manifest_version": 2, "name": "YoutubeDL-Material", - "version": "0.3", + "version": "0.4", "description": "The Official Firefox & Chrome Extension of YoutubeDL-Material, an open-source and self-hosted YouTube downloader.", "background": { "scripts": ["background.js"] }, "browser_action": { - "default_icon": "favicon.png" + "default_icon": "favicon.png", + "default_popup": "popup.html", + "default_title": "YoutubeDL-Material" }, "permissions": [ "tabs", - "storage" + "storage", + "contextMenus" ], "options_ui": { "page": "options.html", diff --git a/chrome-extension/popup.html b/chrome-extension/popup.html new file mode 100644 index 0000000..467925c --- /dev/null +++ b/chrome-extension/popup.html @@ -0,0 +1,35 @@ + + +
+ + + + + + + + + + +