Skip to content

Commit

Permalink
Temporary disable the button on Pale Moon Add-ons sute
Browse files Browse the repository at this point in the history
  • Loading branch information
JustOff committed Mar 6, 2018
1 parent 2c8001f commit 359266e
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions xul/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,13 @@ ESrcExplorer.prototype = {
openExplorerOrSave: function(aUrl, aSave) {
let crx_url, filename;
if (apmo_pattern.test(aUrl)) {
crx_url = this.tabBrowser.getBrowserForTab(this.tabBrowser.selectedTab).
contentDocument.getElementsByClassName("dllink_green")[0].href;
try {
crx_url = this.tabBrowser.getBrowserForTab(this.tabBrowser.selectedTab).
contentDocument.getElementsByClassName("dllink_green")[0].href;
} catch(e) {
// We need a better way to find the latest version of extensions at apmo
return;
}
} else if (apmo_download_pattern.test(aUrl)) {
crx_url = aUrl;
} else {
Expand Down Expand Up @@ -113,8 +118,9 @@ ESrcExplorer.prototype = {

updateButton: function(aURI) {
let isExtUrl = cws_pattern.test(aURI.spec) || ows_pattern.test(aURI.spec) ||
amo_pattern.test(aURI.spec) || amo_file_version_pattern.test(aURI.spec) ||
apmo_pattern.test(aURI.spec);
amo_pattern.test(aURI.spec) || amo_file_version_pattern.test(aURI.spec);
// We need a better way to find the latest version of extensions at apmo
// apmo_pattern.test(aURI.spec);
if (isExtUrl) {
this.button.style.display = "block";
} else {
Expand Down

0 comments on commit 359266e

Please sign in to comment.