mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
Prevented error message when notifications where triggered on preview, which is not possible.
This commit is contained in:
parent
ec1ae73cda
commit
9c7e842f4b
1 changed files with 8 additions and 1 deletions
|
@ -23,10 +23,17 @@ exports.notify = function({url, errorStack, messageId}, {lists, notificationPref
|
|||
var tab, tabBrowser;
|
||||
if (browser){
|
||||
window = tabUtils.getOwnerWindow(browser);
|
||||
if (!window){
|
||||
return;
|
||||
}
|
||||
tab = tabUtils.getTabForBrowser(browser);
|
||||
if (!tab){
|
||||
// page ist displayed in preview
|
||||
return;
|
||||
}
|
||||
tabBrowser = tabUtils.getTabBrowser(window);
|
||||
}
|
||||
else if (window){
|
||||
else if (window){
|
||||
tab = tabUtils.getTabForContentWindow(window);
|
||||
tabBrowser = tabUtils.getTabBrowserForTab(tab);
|
||||
browser = tabUtils.getBrowserForTab(tab);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue