However, commands of Flagfox actually don't work. After investigation I've realized that the parameter "frameUrl" - a part of "info" object for callbacks of browser.menus.onClicked - becomes to an internal URL of the sidebar panel itself, like "moz-extension://xxxx-xxxx-xxxx-xxxx/..." on such cases. Thus,
Code: Select all
function getTopPriorityUrlFromMenuEvent(info) {
for (const prop of ["srcUrl","linkUrl","frameUrl","pageUrl"])
if (isNonEmptyString(info[prop]))
return info[prop];
return null;
}
Code: Select all
browser.menus.onClicked.addListener(function(info, tab) {
newLocationForMenuEvent(info, tab).then(location => {
actions.doAction(getActionIDfromMenuItemID(info.menuItemId), location, getOpenInModeForMenuEvent(info));
debugLog_events("Flagfox menu item click processed for target:", info, tab, location);
});
});
Could you make Flagfox compatible with such type addons?
This problem was originally reported at Tree Style Tab's issue tracker: https://github.com/piroor/treestyletab/issues/2363