Delete background.js

master
Giteadmin 2023-09-08 22:16:44 +02:00
parent cd325fceaf
commit 8fd5924c57
1 changed files with 0 additions and 19 deletions

View File

@ -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 });
}
});