mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 16:28:38 +09:00
Revert "[PALEMOON] Sanitize - "Form and search history" sanitize also the Findbar text and history (Ctrl-Z)"
This reverts commit a97887a67742aa3f95c47ad79b3c4c3827565944.
This commit is contained in:
parent
dc990a5720
commit
388ca23b51
1 changed files with 7 additions and 17 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue