Fix: tagging did not work on facebook

This commit is contained in:
shinigami-eyes 2019-06-14 19:03:50 +02:00
parent ee770f4610
commit 6d5c75cfbd
1 changed files with 9 additions and 3 deletions

View File

@ -431,14 +431,19 @@ browser.contextMenus.onClicked.addListener(function (info, tab) {
return;
}
var tabId = tab.id;
var frameId = info.frameId;
var label = info.menuItemId.substring('mark-'.length);
if (label == 'none') label = '';
browser.tabs.sendMessage(tab.id, {
browser.tabs.sendMessage(tabId, {
mark: label,
url: info.linkUrl,
tabId: tabId,
frameId: frameId,
// elementId: info.targetElementId,
debug: overrides.debug
}, null, response => {
}, { frameId: frameId }, response => {
if (!response.identifier) return;
if (response.mark){
if (badIdentifiers[response.identifier]) return;
@ -447,7 +452,8 @@ browser.contextMenus.onClicked.addListener(function (info, tab) {
}
if (response.debug && /^facebook\.com\/[a-zA-Z]/.test(response.identifier))
alert('Note: could not find numeric id for ' + response.identifier);
response.tabId = tab.id;
response.tabId = tabId;
response.frameId = frameId;
saveLabel(response);
})