summaryrefslogtreecommitdiffstats
path: root/application/palemoon/base/content/browser.js
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-06-12 22:02:00 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-06-12 22:05:07 +0200
commitfb291846a59f9b8eaf8bba29e0d9794893e895bf (patch)
tree7430f5b98d8d40ba8a4baf6992936db82c1552a7 /application/palemoon/base/content/browser.js
parent518f95c2baf85a21c79d23065357f7299a021a69 (diff)
downloadUXP-fb291846a59f9b8eaf8bba29e0d9794893e895bf.tar
UXP-fb291846a59f9b8eaf8bba29e0d9794893e895bf.tar.gz
UXP-fb291846a59f9b8eaf8bba29e0d9794893e895bf.tar.lz
UXP-fb291846a59f9b8eaf8bba29e0d9794893e895bf.tar.xz
UXP-fb291846a59f9b8eaf8bba29e0d9794893e895bf.zip
Minimal easy fix -- move findbar getters to tabbrowser.
Resolves #487
Diffstat (limited to 'application/palemoon/base/content/browser.js')
-rw-r--r--application/palemoon/base/content/browser.js21
1 files changed, 7 insertions, 14 deletions
diff --git a/application/palemoon/base/content/browser.js b/application/palemoon/base/content/browser.js
index ba791f709..6df6488b1 100644
--- a/application/palemoon/base/content/browser.js
+++ b/application/palemoon/base/content/browser.js
@@ -53,20 +53,13 @@ var gEditUIVisible = true;
// Smart getter for the findbar. If you don't wish to force the creation of
// the findbar, check gFindBarInitialized first.
-var gFindBarInitialized = false;
-XPCOMUtils.defineLazyGetter(window, "gFindBar", function() {
- let XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
- let findbar = document.createElementNS(XULNS, "findbar");
- findbar.id = "FindToolbar";
-
- let browserBottomBox = document.getElementById("browser-bottombox");
- browserBottomBox.insertBefore(findbar, browserBottomBox.firstChild);
-
- // Force a style flush to ensure that our binding is attached.
- findbar.clientTop;
- findbar.browser = gBrowser.mCurrentBrowser;
- window.gFindBarInitialized = true;
- return findbar;
+
+this.__defineGetter__("gFindBar", function() {
+ return window.gBrowser.getFindBar();
+});
+
+this.__defineGetter__("gFindBarInitialized", function() {
+ return window.gBrowser.isFindBarInitialized();
});
XPCOMUtils.defineLazyModuleGetter(this, "BrowserUtils",