Skip to content

Commit

Permalink
astob 1.5.6: Properly handle auxclick event
Browse files Browse the repository at this point in the history
  • Loading branch information
JustOff committed Jul 11, 2017
1 parent 7f1c5e1 commit 4ac5f14
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions chrome/astob.js
Expand Up @@ -56,6 +56,12 @@ if (typeof activestopbutton == "undefined") {
}
},

auxclickStopE: function(e) {
if (activestopbutton.alltabs == "r_click" && e.button == 2) {
e.preventDefault();
}
},

manageCSS: function(mode) {
if (this.smnk) return;
var sss = Components.classes["@mozilla.org/content/style-sheet-service;1"]
Expand Down Expand Up @@ -91,6 +97,7 @@ if (typeof activestopbutton == "undefined") {
if (stb.localName == "toolbarbutton") {
this.sblist.push(stb);
stb.addEventListener('click', this.clickStopE, false);
stb.addEventListener('auxclick', this.auxclickStopE, false);
stb.removeAttribute("disabled");
}
}
Expand All @@ -99,6 +106,7 @@ if (typeof activestopbutton == "undefined") {
beforeCustomize: function() {
for (let stb of this.sblist) {
stb.removeEventListener('click', this.clickStopE);
stb.removeEventListener('auxclick', this.auxclickStopE);
}
this.sblist.length = 0;
if (!this.aust) {
Expand Down
2 changes: 1 addition & 1 deletion install.rdf
Expand Up @@ -3,7 +3,7 @@

<Description about="urn:mozilla:install-manifest">
<em:id>{9e96e0c4-9bde-49b7-989f-a4ca4bdc90bb}</em:id>
<em:version>1.5.5</em:version>
<em:version>1.5.6</em:version>
<em:type>2</em:type>
<em:iconURL>chrome://astob/content/astob.png</em:iconURL>
<em:optionsURL>chrome://astob/content/options.xul</em:optionsURL>
Expand Down

0 comments on commit 4ac5f14

Please sign in to comment.