chrome.contextMenus.update bug is fixed in Chrome 65.0.3289

#272
This commit is contained in:
tophf 2017-12-12 06:20:07 +03:00
parent bb8dc04954
commit ad692d4f61

View File

@ -148,9 +148,8 @@ if (chrome.contextMenus) {
} }
}; };
// circumvent the bug with disabling check marks in Chrome 62+ // circumvent the bug with disabling check marks in Chrome 62-64
// TODO: replace 1e6 with the actual rev. number when/if the bug is fixed const toggleCheckmark = CHROME >= 3172 && CHROME <= 3288 ?
const toggleCheckmark = CHROME >= 3172 && CHROME <= 1e6 ?
(id => chrome.contextMenus.remove(id, () => createContextMenus([id]) + ignoreChromeError())) : (id => chrome.contextMenus.remove(id, () => createContextMenus([id]) + ignoreChromeError())) :
((id, checked) => chrome.contextMenus.update(id, {checked}, ignoreChromeError)); ((id, checked) => chrome.contextMenus.update(id, {checked}, ignoreChromeError));