mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-23 23:57:31 +09:00
[PALEMOON] Use ShellService.jsm to get the shell service in utilityOverlay.js
This commit is contained in:
parent
6543b2afe6
commit
41f8075d54
1 changed files with 5 additions and 7 deletions
|
|
@ -9,6 +9,9 @@ Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
|
Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
|
||||||
Components.utils.import("resource:///modules/RecentWindow.jsm");
|
Components.utils.import("resource:///modules/RecentWindow.jsm");
|
||||||
|
|
||||||
|
XPCOMUtils.defineLazyModuleGetter(this, "ShellService",
|
||||||
|
"resource:///modules/ShellService.jsm");
|
||||||
|
|
||||||
XPCOMUtils.defineLazyGetter(this, "BROWSER_NEW_TAB_URL", function () {
|
XPCOMUtils.defineLazyGetter(this, "BROWSER_NEW_TAB_URL", function () {
|
||||||
const PREF = "browser.newtab.url";
|
const PREF = "browser.newtab.url";
|
||||||
|
|
||||||
|
|
@ -448,15 +451,10 @@ function gatherTextUnder ( root )
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This function exists for legacy reasons.
|
||||||
function getShellService()
|
function getShellService()
|
||||||
{
|
{
|
||||||
var shell = null;
|
return ShellService;
|
||||||
try {
|
|
||||||
shell = Components.classes["@mozilla.org/browser/shell-service;1"]
|
|
||||||
.getService(Components.interfaces.nsIShellService);
|
|
||||||
} catch (e) {
|
|
||||||
}
|
|
||||||
return shell;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function isBidiEnabled() {
|
function isBidiEnabled() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue