Skip to content

Commit

Permalink
Empty host (e.g. file:/// URIs) should also mean that the menu item i…
Browse files Browse the repository at this point in the history
…sn't shown.
  • Loading branch information
philikon committed May 12, 2010
1 parent 19d7bbb commit 7a07985
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions modules/prototypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,11 @@ BarTabHandler.prototype = {
host = tab.linkedBrowser.currentURI.host;
} catch (ex) {
// Most likely uri.host doesn't exist which probably means
// whitelisting doesn't make sense on this tab. Don't
// show the menu item
// whitelisting doesn't make sense on this tab. Set empty
// host so we don't show the menu item
host = '';
}
if (!host) {
neverunload.setAttribute("hidden", "true");
unloadtab.removeAttribute("disabled");
return;
Expand Down

0 comments on commit 7a07985

Please sign in to comment.