mirror of
https://github.com/andrei0x309/yup-live-chrome-extension.git
synced 2024-11-09 18:10:57 +00:00
add: remove all to avoid error logging
This commit is contained in:
parent
def6c6d5f9
commit
e4be318ca9
@ -42,6 +42,7 @@ const onRightClickLike = async (store, info, tab) => {
|
||||
|
||||
const enableRightClickVote = async () => {
|
||||
try {
|
||||
await chrome.contextMenus.removeAll();
|
||||
await chrome.contextMenus.create({
|
||||
id: "yup-like",
|
||||
title: "Like this page",
|
||||
@ -50,9 +51,6 @@ const enableRightClickVote = async () => {
|
||||
} catch (error) {
|
||||
// ignore
|
||||
}
|
||||
if(chrome.runtime.lastError) {
|
||||
console.warn('Error creating context menu', chrome.runtime.lastError.message)
|
||||
}
|
||||
}
|
||||
|
||||
const disableRightClickVote = async () => {
|
||||
|
Loading…
Reference in New Issue
Block a user