Delete background.js
parent
cd325fceaf
commit
8fd5924c57
|
|
@ -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 });
|
||||
}
|
||||
});
|
||||
Loading…
Reference in New Issue