mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 09:07:54 +01:00
Fixes #721; popover works in tabs without explicit URL
This commit is contained in:
parent
fe28a9edbf
commit
ac6211f1af
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue