Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Namespace the attribute

  • Loading branch information...
commit 513016788fb32c9ba8bad3d877c5c56f7c76b5f0 1 parent a561f2b
@philikon authored
Showing with 6 additions and 4 deletions.
  1. +1 −1  bartab.css
  2. +5 −3 bootstrap.js
View
2  bartab.css
@@ -1,3 +1,3 @@
-.tabbrowser-tab[ontab=true] {
+.tabbrowser-tab[bartab-ontab=true] {
opacity: .5;
}
View
8 bootstrap.js
@@ -45,6 +45,8 @@ let unloaders = [];
// This will contain the file:// uri pointing to bartab.css
let css_uri;
+const ONTAB_ATTR = "bartab-ontab";
+
/**
* Lots of rubbish that's necessary because we're a restartless add-on
* (no default preferences, no chrome manifest)
@@ -166,10 +168,10 @@ BarTabLite.prototype = {
*/
onTabRestoring: function(aEvent) {
let tab = aEvent.originalTarget;
- if (tab.selected || tab.getAttribute("ontab") == "true") {
+ if (tab.selected || tab.getAttribute(ONTAB_ATTR) == "true") {
return;
}
- tab.setAttribute("ontab", "true");
+ tab.setAttribute(ONTAB_ATTR, "true");
(new BarTabRestoreProgressListener()).hook(tab);
}
};
@@ -198,7 +200,7 @@ BarTabRestoreProgressListener.prototype = {
/*** nsIWebProgressListener ***/
onStateChange: function (aWebProgress, aRequest, aStateFlags, aStatus) {
- this._tab.removeAttribute("ontab");
+ this._tab.removeAttribute(ONTAB_ATTR);
this.unhook();
},
onProgressChange: function () {},
Please sign in to comment.
Something went wrong with that request. Please try again.