mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-30 20:37:31 +09:00
Merge remote-tracking branch 'origin/master' into custom
This commit is contained in:
commit
220b809fb9
37 changed files with 560 additions and 387 deletions
|
|
@ -12,6 +12,9 @@ Components.utils.import("resource:///modules/RecentWindow.jsm");
|
|||
XPCOMUtils.defineLazyModuleGetter(this, "ShellService",
|
||||
"resource:///modules/ShellService.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Deprecated",
|
||||
"resource://gre/modules/Deprecated.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "BROWSER_NEW_TAB_URL", function () {
|
||||
const PREF = "browser.newtab.url";
|
||||
|
||||
|
|
@ -57,6 +60,14 @@ function getBrowserURL()
|
|||
return "chrome://browser/content/browser.xul";
|
||||
}
|
||||
|
||||
function getBoolPref(pref, defaultValue) {
|
||||
Deprecated.warning("getBoolPref is deprecated and will be removed in a future release. " +
|
||||
"You should use Services.pref.getBoolPref (Services.jsm).",
|
||||
"https://github.com/MoonchildProductions/UXP/issues/989");
|
||||
return Services.prefs.getBoolPref(pref, defaultValue);
|
||||
}
|
||||
|
||||
|
||||
function getTopWin(skipPopups) {
|
||||
// If this is called in a browser window, use that window regardless of
|
||||
// whether it's the frontmost window, since commands can be executed in
|
||||
|
|
@ -701,6 +712,18 @@ function openAdvancedPreferences(tabID)
|
|||
openPreferences("paneAdvanced", { "advancedTab" : tabID });
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens the release notes page for this version of the application.
|
||||
*/
|
||||
function openReleaseNotes()
|
||||
{
|
||||
var relnotesURL = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"]
|
||||
.getService(Components.interfaces.nsIURLFormatter)
|
||||
.formatURLPref("app.releaseNotesURL");
|
||||
|
||||
openUILinkIn(relnotesURL, "tab");
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens the troubleshooting information (about:support) page for this version
|
||||
* of the application.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue