Files
youtube-downloader/extension/background.js
2024-07-21 18:56:08 +02:00

11 lines
281 B
JavaScript

browser.menus.create({
id: "youtube-download",
title: "Download",
contexts: ["all"],
documentUrlPatterns: ["*://*.youtube.com/*"],
});
browser.menus.onShown.addListener((info, tab) => {
browser.tabs.sendMessage(tab.id, { action: "check-element", info: info });
});