From 6a3be0dcc645079d2818be085ff641435013a305 Mon Sep 17 00:00:00 2001 From: anekos Date: Mon, 8 Dec 2008 23:30:25 +0900 Subject: [PATCH] Enabled autocommmands(trigger) to call function. --- common/content/events.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/content/events.js b/common/content/events.js index 7f0e47ab..87f7df53 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -251,7 +251,10 @@ function AutoCommands() //{{{ lastPattern = autoCmd.pattern; liberator.echomsg("autocommand " + autoCmd.command, 9); - liberator.execute(commands.replaceTokens(autoCmd.command, args)); + if (autoCmd.command instanceof Function) + autoCmd.command.call(autoCmd, args); + else + liberator.execute(commands.replaceTokens(autoCmd.command, args)); } } }