Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #129 Open the add-on details page when clicking Open Manager i…
…n the install door hanger notification
- Loading branch information
Showing
2 changed files
with
18 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
var EXPORTED_SYMBOLS = ["Scriptish_openManager"]; | ||
Components.utils.import("resource://scriptish/constants.js"); | ||
|
||
function Scriptish_openManager() { | ||
var browserWin = Services.wm.getMostRecentWindow("navigator:browser"); | ||
if (browserWin.BrowserOpenAddonsMgr) // ff | ||
browserWin.BrowserOpenAddonsMgr("addons://list/userscript"); | ||
else if (browserWin.toEM) // sm | ||
browserWin.toEM("addons://list/userscript"); | ||
function Scriptish_openManager(aURL, aID) { | ||
aURL = aURL || "addons://list/userscript"; | ||
if (aID) { | ||
aURL = 'addons://detail/' + encodeURIComponent(aID) + '/preferences'; | ||
} | ||
|
||
let browserWin = Services.wm.getMostRecentWindow("navigator:browser"); | ||
// Fx | ||
if (browserWin.BrowserOpenAddonsMgr) { | ||
browserWin.BrowserOpenAddonsMgr(aURL); | ||
} | ||
// Sm | ||
else if (browserWin.toEM) { | ||
browserWin.toEM(aURL); | ||
} | ||
} |