From 8fd5924c57a86d864dc75be41fe74fb0b5d86303 Mon Sep 17 00:00:00 2001 From: Giteadmin Date: Fri, 8 Sep 2023 22:16:44 +0200 Subject: [PATCH] Delete background.js --- background.js | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 background.js diff --git a/background.js b/background.js deleted file mode 100644 index 6dea0da..0000000 --- a/background.js +++ /dev/null @@ -1,19 +0,0 @@ -chrome.runtime.onInstalled.addListener(() => { - chrome.contextMenus.create({ - id: 'openInMantis', - title: 'Open in Mantis', - contexts: ['selection'] - }); -}); - -chrome.contextMenus.onClicked.addListener((info) => { - if (info.menuItemId === 'openInMantis') { - let selectedText = info.selectionText; - if (selectedText.startsWith('#')) { - selectedText = selectedText.substring(1); - } - const fixedUrl = 'https://ot.syncore.at/view.php?id='; - const completeUrl = `${fixedUrl}${selectedText}`; - chrome.tabs.create({ url: completeUrl }); - } -});