Skip to content

Commit

Permalink
Allow any version download from AMO (workaround)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustOff committed Aug 18, 2017
1 parent 1280a17 commit 9d87928
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
7 changes: 7 additions & 0 deletions amo.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("addons.mozilla.org"){
.button.concealed {
cursor: pointer !important;
pointer-events: auto !important;
}
}
11 changes: 11 additions & 0 deletions bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ Cu.import("resource://gre/modules/FileUtils.jsm");
const pr = {PR_RDONLY: 0x01, PR_WRONLY: 0x02, PR_RDWR: 0x04, PR_CREATE_FILE: 0x08, PR_APPEND: 0x10, PR_TRUNCATE: 0x20};
var window = null, tempDir = null;

var styleSheetService = Cc["@mozilla.org/content/style-sheet-service;1"].getService(Ci.nsIStyleSheetService);
var amoCSS = Services.io.newURI("chrome://moonttool/content/amo.css", null, null);

function installFromFile(aFile) {
function doInstall(aInstall) {
var installs = [ aInstall ];
Expand Down Expand Up @@ -201,6 +204,10 @@ var moonttoolObserver = {
function startup(data, reason) {
AddonManager.addInstallListener(installListener);
Services.obs.addObserver(moonttoolObserver, "moonttoolEvent", false);

if (!styleSheetService.sheetRegistered(amoCSS, styleSheetService.USER_SHEET)) {
styleSheetService.loadAndRegisterSheet(amoCSS, styleSheetService.USER_SHEET);
}
}

function shutdown(data, reason) {
Expand All @@ -209,6 +216,10 @@ function shutdown(data, reason) {
window = null;
Services.obs.removeObserver(moonttoolObserver, "moonttoolEvent");
AddonManager.removeInstallListener(installListener);

if (styleSheetService.sheetRegistered(amoCSS, styleSheetService.USER_SHEET)) {
styleSheetService.unregisterSheet(amoCSS, styleSheetService.USER_SHEET);
}
}

function install() {};
Expand Down
1 change: 1 addition & 0 deletions chrome.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
content moonttool ./
2 changes: 1 addition & 1 deletion install.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest">
<em:id>[email protected]</em:id>
<em:version>1.0.5</em:version>
<em:version>1.0.6</em:version>
<em:type>2</em:type>
<em:bootstrap>true</em:bootstrap>
<em:name>Moon Tester Tool</em:name>
Expand Down

0 comments on commit 9d87928

Please sign in to comment.