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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user