mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-24 16:17:29 +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
|
|
@ -56,10 +56,11 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|||
<field name="AppConstants" readonly="true">
|
||||
(Components.utils.import("resource://gre/modules/AppConstants.jsm", {})).AppConstants;
|
||||
</field>
|
||||
|
||||
#ifdef MOZ_WEBEXTENSIONS
|
||||
<field name="ExtensionSearchHandler" readonly="true">
|
||||
(Components.utils.import("resource://gre/modules/ExtensionSearchHandler.jsm", {})).ExtensionSearchHandler;
|
||||
</field>
|
||||
#endif
|
||||
|
||||
<constructor><![CDATA[
|
||||
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
|
||||
);
|
||||
break;
|
||||
#ifdef MOZ_WEBEXTENSIONS
|
||||
case "extension":
|
||||
this.handleRevert();
|
||||
// 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;
|
||||
this.ExtensionSearchHandler.handleInputEntered(keyword, searchString, where);
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
// 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.formatValue();
|
||||
}
|
||||
#ifdef MOZ_WEBEXTENSIONS
|
||||
if (ExtensionSearchHandler.hasActiveInputSession()) {
|
||||
ExtensionSearchHandler.handleInputCancelled();
|
||||
}
|
||||
#endif
|
||||
]]></handler>
|
||||
|
||||
<handler event="dragstart" phase="capturing"><![CDATA[
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue