From 8f9be95a083bb3156330f88404b605c932dfeda0 Mon Sep 17 00:00:00 2001 From: Deathamns Date: Mon, 16 Mar 2015 10:37:55 +0100 Subject: [PATCH] abp:subscribe fixes Test a[href^="abp:"], since the protocol probably not used for anything else, also "a", because ABP checks only anchors, and these links are made only for ABP. Also, the event target is not always the link, so at least some parents should be tested as well. --- platform/firefox/vapi-background.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js index 5378fca..1619735 100644 --- a/platform/firefox/vapi-background.js +++ b/platform/firefox/vapi-background.js @@ -455,11 +455,9 @@ vAPI.tabs.getTabId = function(target) { if ( vAPI.fennec ) { if ( target.browser ) { // target is a tab - return target.browser.loadContext.DOMWindowID; + target = target.browser; } return target.loadContext.DOMWindowID; - - return -1; } if ( target.linkedPanel ) {