1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-23 02:42:41 +01:00

Fixes #721; popover works in tabs without explicit URL

This commit is contained in:
Chris 2015-02-09 19:31:21 -07:00
parent fe28a9edbf
commit ac6211f1af

View File

@ -240,7 +240,7 @@
index: tab.browserWindow.tabs.indexOf(tab), index: tab.browserWindow.tabs.indexOf(tab),
windowId: safari.application.browserWindows.indexOf(tab.browserWindow), windowId: safari.application.browserWindows.indexOf(tab.browserWindow),
active: tab === tab.browserWindow.activeTab, active: tab === tab.browserWindow.activeTab,
url: tab.url, url: tab.url || "about:blank",
title: tab.title title: tab.title
}); });
}; };
@ -272,7 +272,9 @@
var url = details.url.replace(rgxHash, ''); var url = details.url.replace(rgxHash, '');
for(var i = 0; i < win.tabs.length; i++) { for(var i = 0; i < win.tabs.length; i++) {
if(win.tabs[i].url.replace(rgxHash, '') === url) { // Some tabs don't have a URL
if(win.tabs[i].url &&
win.tabs[i].url.replace(rgxHash, '') === url) {
win.tabs[i].activate(); win.tabs[i].activate();
return true; return true;
} }