1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-13 21:15:47 +01:00

add 'eventignore' option

This commit is contained in:
Doug Kearns
2008-08-28 13:15:47 +00:00
parent 61d29dc6be
commit 3a468168c7
4 changed files with 28 additions and 8 deletions

View File

@@ -46,6 +46,10 @@ liberator.AutoCommands = function () //{{{
////////////////////// OPTIONS /////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{
liberator.options.add(["eventignore", "ei"],
"List of autocommand event names which should be ignored",
"stringlist", "");
liberator.options.add(["focuscontent", "fc"],
"Try to stay in normal mode after loading a web page",
"boolean", false);
@@ -220,6 +224,13 @@ liberator.AutoCommands = function () //{{{
trigger: function (auEvent, url)
{
if (liberator.options["eventignore"].split(",").some(function (event) {
return event == "all" || event == auEvent;
}))
{
return;
}
if (autoCommands[auEvent])
{
for (var i = 0; i < autoCommands[auEvent].length; i++)