Skip to content

Commit

Permalink
No need for special treatment for about:blank and about:newtab
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexVallat committed Mar 31, 2015
1 parent 49442e2 commit 50dfc40
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions platform/firefox/vapi-background.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,25 +331,8 @@ var tabWatcher = {
},

onTabSelect: function({target}) {
// target is tab in Firefox, browser in Fennec
var browser = (target.linkedBrowser || target);
var URI = browser.currentURI;
var aboutPath = URI.schemeIs('about') && URI.path;
var tabId = vAPI.tabs.getTabId(target);

if ( !aboutPath || (aboutPath !== 'blank' && aboutPath !== 'newtab') ) {
vAPI.setIcon(tabId, getOwnerWindow(target));
return;
}

if ( browser.webNavigation.busyFlags === 0 || /*BUSY_FLAGS_NONE*/
browser.webNavigation.busyFlags === undefined) {
vAPI.tabs.onNavigation({
frameId: 0,
tabId: tabId,
url: URI.asciiSpec
});
}
vAPI.setIcon(vAPI.tabs.getTabId(target), getOwnerWindow(target));
return;
},

onLocationChange: function(browser, webProgress, request, location, flags) {
Expand Down

0 comments on commit 50dfc40

Please sign in to comment.