mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-30 19:17:31 +09:00
Make Basilisk function without WebExtensions
This commit is contained in:
parent
bbe87d1e96
commit
251ddc2212
3 changed files with 12 additions and 3 deletions
|
|
@ -9,7 +9,9 @@ var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||||
|
|
||||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
Cu.import("resource://gre/modules/Services.jsm");
|
Cu.import("resource://gre/modules/Services.jsm");
|
||||||
|
#ifdef MOZ_WEBEXTENSIONS
|
||||||
Cu.import("resource://gre/modules/ExtensionContent.jsm");
|
Cu.import("resource://gre/modules/ExtensionContent.jsm");
|
||||||
|
#endif
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "E10SUtils",
|
XPCOMUtils.defineLazyModuleGetter(this, "E10SUtils",
|
||||||
"resource:///modules/E10SUtils.jsm");
|
"resource:///modules/E10SUtils.jsm");
|
||||||
|
|
@ -929,11 +931,13 @@ var UserContextIdNotifier = {
|
||||||
|
|
||||||
UserContextIdNotifier.init();
|
UserContextIdNotifier.init();
|
||||||
|
|
||||||
|
#ifdef MOZ_WEBEXTENSIONS
|
||||||
ExtensionContent.init(this);
|
ExtensionContent.init(this);
|
||||||
addEventListener("unload", () => {
|
addEventListener("unload", () => {
|
||||||
ExtensionContent.uninit(this);
|
ExtensionContent.uninit(this);
|
||||||
RefreshBlocker.uninit();
|
RefreshBlocker.uninit();
|
||||||
});
|
});
|
||||||
|
#endif
|
||||||
|
|
||||||
addMessageListener("AllowScriptsToClose", () => {
|
addMessageListener("AllowScriptsToClose", () => {
|
||||||
content.QueryInterface(Ci.nsIInterfaceRequestor)
|
content.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||||
|
|
|
||||||
|
|
@ -56,10 +56,11 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
<field name="AppConstants" readonly="true">
|
<field name="AppConstants" readonly="true">
|
||||||
(Components.utils.import("resource://gre/modules/AppConstants.jsm", {})).AppConstants;
|
(Components.utils.import("resource://gre/modules/AppConstants.jsm", {})).AppConstants;
|
||||||
</field>
|
</field>
|
||||||
|
#ifdef MOZ_WEBEXTENSIONS
|
||||||
<field name="ExtensionSearchHandler" readonly="true">
|
<field name="ExtensionSearchHandler" readonly="true">
|
||||||
(Components.utils.import("resource://gre/modules/ExtensionSearchHandler.jsm", {})).ExtensionSearchHandler;
|
(Components.utils.import("resource://gre/modules/ExtensionSearchHandler.jsm", {})).ExtensionSearchHandler;
|
||||||
</field>
|
</field>
|
||||||
|
#endif
|
||||||
|
|
||||||
<constructor><![CDATA[
|
<constructor><![CDATA[
|
||||||
this._prefs = Components.classes["@mozilla.org/preferences-service;1"]
|
this._prefs = Components.classes["@mozilla.org/preferences-service;1"]
|
||||||
|
|
@ -487,6 +488,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
actionDetails
|
actionDetails
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
#ifdef MOZ_WEBEXTENSIONS
|
||||||
case "extension":
|
case "extension":
|
||||||
this.handleRevert();
|
this.handleRevert();
|
||||||
// Give the extension control of handling the command.
|
// Give the extension control of handling the command.
|
||||||
|
|
@ -494,6 +496,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
let keyword = action.params.keyword;
|
let keyword = action.params.keyword;
|
||||||
this.ExtensionSearchHandler.handleInputEntered(keyword, searchString, where);
|
this.ExtensionSearchHandler.handleInputEntered(keyword, searchString, where);
|
||||||
return;
|
return;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// This is a fallback for add-ons and old testing code that directly
|
// This is a fallback for add-ons and old testing code that directly
|
||||||
|
|
@ -1211,9 +1214,11 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
this._clearNoActions();
|
this._clearNoActions();
|
||||||
this.formatValue();
|
this.formatValue();
|
||||||
}
|
}
|
||||||
|
#ifdef MOZ_WEBEXTENSIONS
|
||||||
if (ExtensionSearchHandler.hasActiveInputSession()) {
|
if (ExtensionSearchHandler.hasActiveInputSession()) {
|
||||||
ExtensionSearchHandler.handleInputCancelled();
|
ExtensionSearchHandler.handleInputCancelled();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
]]></handler>
|
]]></handler>
|
||||||
|
|
||||||
<handler event="dragstart" phase="capturing"><![CDATA[
|
<handler event="dragstart" phase="capturing"><![CDATA[
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ browser.jar:
|
||||||
#endif
|
#endif
|
||||||
content/browser/browser-thumbnails.js (content/browser-thumbnails.js)
|
content/browser/browser-thumbnails.js (content/browser-thumbnails.js)
|
||||||
content/browser/browser-trackingprotection.js (content/browser-trackingprotection.js)
|
content/browser/browser-trackingprotection.js (content/browser-trackingprotection.js)
|
||||||
content/browser/tab-content.js (content/tab-content.js)
|
* content/browser/tab-content.js (content/tab-content.js)
|
||||||
content/browser/content.js (content/content.js)
|
content/browser/content.js (content/content.js)
|
||||||
content/browser/social-content.js (content/social-content.js)
|
content/browser/social-content.js (content/social-content.js)
|
||||||
content/browser/defaultthemes/1.footer.jpg (content/defaultthemes/1.footer.jpg)
|
content/browser/defaultthemes/1.footer.jpg (content/defaultthemes/1.footer.jpg)
|
||||||
|
|
@ -166,7 +166,7 @@ browser.jar:
|
||||||
content/browser/contentSearchUI.css (content/contentSearchUI.css)
|
content/browser/contentSearchUI.css (content/contentSearchUI.css)
|
||||||
content/browser/tabbrowser.css (content/tabbrowser.css)
|
content/browser/tabbrowser.css (content/tabbrowser.css)
|
||||||
content/browser/tabbrowser.xml (content/tabbrowser.xml)
|
content/browser/tabbrowser.xml (content/tabbrowser.xml)
|
||||||
content/browser/urlbarBindings.xml (content/urlbarBindings.xml)
|
* content/browser/urlbarBindings.xml (content/urlbarBindings.xml)
|
||||||
content/browser/utilityOverlay.js (content/utilityOverlay.js)
|
content/browser/utilityOverlay.js (content/utilityOverlay.js)
|
||||||
content/browser/usercontext.svg (content/usercontext.svg)
|
content/browser/usercontext.svg (content/usercontext.svg)
|
||||||
content/browser/web-panels.js (content/web-panels.js)
|
content/browser/web-panels.js (content/web-panels.js)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue