From ad692d4f61940db39384adfc2817b01825ff7084 Mon Sep 17 00:00:00 2001 From: tophf Date: Tue, 12 Dec 2017 06:20:07 +0300 Subject: [PATCH] chrome.contextMenus.update bug is fixed in Chrome 65.0.3289 #272 --- background/background.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/background/background.js b/background/background.js index 4ae24a2b..7c9e1012 100644 --- a/background/background.js +++ b/background/background.js @@ -148,9 +148,8 @@ if (chrome.contextMenus) { } }; - // circumvent the bug with disabling check marks in Chrome 62+ - // TODO: replace 1e6 with the actual rev. number when/if the bug is fixed - const toggleCheckmark = CHROME >= 3172 && CHROME <= 1e6 ? + // circumvent the bug with disabling check marks in Chrome 62-64 + const toggleCheckmark = CHROME >= 3172 && CHROME <= 3288 ? (id => chrome.contextMenus.remove(id, () => createContextMenus([id]) + ignoreChromeError())) : ((id, checked) => chrome.contextMenus.update(id, {checked}, ignoreChromeError));