summaryrefslogtreecommitdiffstats
path: root/application/palemoon/base/content/browser.js
diff options
context:
space:
mode:
Diffstat (limited to 'application/palemoon/base/content/browser.js')
-rw-r--r--application/palemoon/base/content/browser.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/application/palemoon/base/content/browser.js b/application/palemoon/base/content/browser.js
index 591d00fbb..eb4916e37 100644
--- a/application/palemoon/base/content/browser.js
+++ b/application/palemoon/base/content/browser.js
@@ -2456,7 +2456,7 @@ function BrowserOnAboutPageLoad(doc) {
docElt.setAttribute("searchEnginePostData", engine.postDataString || "");
docElt.setAttribute("searchEngineURL", engine.searchURL);
}
- updateSearchEngine();
+ Services.search.init(updateSearchEngine);
// Listen for the event that's triggered when the user changes search engine.
// At this point we simply reload about:home to reflect the change.
@@ -2481,7 +2481,7 @@ function BrowserOnAboutPageLoad(doc) {
docElt.setAttribute("searchEnginePostData", engine.postDataString || "");
docElt.setAttribute("searchEngineURL", engine.searchURL);
}
- updateSearchEngine();
+ Services.search.init(updateSearchEngine);
// Listen for the event that's triggered when the user changes search engine.
// At this point we simply reload about:newtab to reflect the change.
@@ -3046,7 +3046,9 @@ const DOMLinkHandler = {
/^(?:https?|ftp):/i.test(link.href) &&
!PrivateBrowsingUtils.isWindowPrivate(window)) {
var engine = { title: link.title, href: link.href };
- BrowserSearch.addEngine(engine, link.ownerDocument);
+ Services.search.init(function () {
+ BrowserSearch.addEngine(engine, link.ownerDocument);
+ });
searchAdded = true;
}
}