Skip to content

Commit

Permalink
Update background.js
Browse files Browse the repository at this point in the history
  • Loading branch information
amirshnll committed Oct 5, 2022
1 parent b429b4a commit 5c286ee
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions background.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
chrome.contextMenus.create({
title: "وبسایت حق فراموشن شدن",
id: "rtbfWebsite",
browser.runtime.onInstalled.addListener(() => {
browser.contextMenus.create(
{
title: "وبسایت حق فراموش شدن",
id: "rtbfWebsite",
},
() => browser.runtime.lastError
);
});

chrome.contextMenus.onClicked.addListener(function (info, tab) {
browser.contextMenus.onClicked.addListener(function (info, tab) {
const { menuItemId } = info;

if (menuItemId === "rtbfWebsite") {
chrome.tabs.create({
browser.tabs.create({
url: "http://rtbf.ir",
});
}
});
});

0 comments on commit 5c286ee

Please sign in to comment.