summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-11-29 16:14:05 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-11-29 16:14:05 +0100
commit1bf68529f1316bc8d3b9d55e561cd9c694cd1d6e (patch)
tree5f03898a448808fa594ecbfb7e8595f0b74891fc /application
parente2d0c96a97d22fdfe392d6e2949ccdb2b7e20ada (diff)
parentb585dad9be7356ab896676adf7ca6638ccff1824 (diff)
downloadUXP-1bf68529f1316bc8d3b9d55e561cd9c694cd1d6e.tar
UXP-1bf68529f1316bc8d3b9d55e561cd9c694cd1d6e.tar.gz
UXP-1bf68529f1316bc8d3b9d55e561cd9c694cd1d6e.tar.lz
UXP-1bf68529f1316bc8d3b9d55e561cd9c694cd1d6e.tar.xz
UXP-1bf68529f1316bc8d3b9d55e561cd9c694cd1d6e.zip
Merge branch 'master' of https://github.com/MoonchildProductions/UXP
Diffstat (limited to 'application')
-rw-r--r--application/palemoon/base/content/sanitize.js24
1 files changed, 7 insertions, 17 deletions
diff --git a/application/palemoon/base/content/sanitize.js b/application/palemoon/base/content/sanitize.js
index 0c85fa215..b4d13d895 100644
--- a/application/palemoon/base/content/sanitize.js
+++ b/application/palemoon/base/content/sanitize.js
@@ -257,18 +257,13 @@ Sanitizer.prototype = {
.getService(Components.interfaces.nsIWindowMediator);
var windows = windowManager.getEnumerator("navigator:browser");
while (windows.hasMoreElements()) {
- let currentWindow = windows.getNext();
- let currentDocument = currentWindow.document;
+ let currentDocument = windows.getNext().document;
let searchBar = currentDocument.getElementById("searchbar");
if (searchBar)
searchBar.textbox.reset();
- let tabBrowser = currentWindow.gBrowser;
- for (let tab of tabBrowser.tabs) {
- if (tabBrowser.isFindBarInitialized(tab))
- tabBrowser.getFindBar(tab).clear();
- }
- // Clear any saved find value
- tabBrowser._lastFindValue = "";
+ let findBar = currentDocument.getElementById("FindToolbar");
+ if (findBar)
+ findBar.clear();
}
let change = { op: "remove" };
@@ -284,8 +279,7 @@ Sanitizer.prototype = {
.getService(Components.interfaces.nsIWindowMediator);
var windows = windowManager.getEnumerator("navigator:browser");
while (windows.hasMoreElements()) {
- let currentWindow = windows.getNext();
- let currentDocument = currentWindow.document;
+ let currentDocument = windows.getNext().document;
let searchBar = currentDocument.getElementById("searchbar");
if (searchBar) {
let transactionMgr = searchBar.textbox.editor.transactionManager;
@@ -296,12 +290,8 @@ Sanitizer.prototype = {
return false;
}
}
- let tabBrowser = currentWindow.gBrowser;
- let findBarCanClear = Array.some(tabBrowser.tabs, function (aTab) {
- return tabBrowser.isFindBarInitialized(aTab) &&
- tabBrowser.getFindBar(aTab).canClear;
- });
- if (findBarCanClear) {
+ let findBar = currentDocument.getElementById("FindToolbar");
+ if (findBar && findBar.canClear) {
aCallback("formdata", true, aArg);
return false;
}