1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-04 04:24:11 +01:00

Call the Sanitize autocommand when clearing each private item.

--HG--
extra : transplant_source : a%AB%B2%02%28R%3EM%E5%AC%7C%CB%18%2A%AA9%FEbt%09
This commit is contained in:
Doug Kearns
2009-09-25 20:59:58 +10:00
parent 252e1965c0
commit cd474c1d6a
3 changed files with 17 additions and 1 deletions

View File

@@ -253,6 +253,21 @@ function Sanitizer() //{{{
}
});
// call Sanitize autocommand
for (let [name, item] in Iterator(self.items))
{
let arg = prefToArg(name);
if (item.clear)
{
let func = item.clear;
item.clear = function () {
autocommands.trigger("Sanitize", { name: arg })
func.call(item);
}
}
}
self.getClearRange = Sanitizer.getClearRange;
// Largely ripped from from browser/base/content/sanitize.js so we can override