diff --git a/NEWS b/NEWS index 1a97900b..a2f884e2 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@
2008-08-16:
* version 2.0 (probably)
+ * new events BookmarkPost, ShellCmdPost, QuitPre
* add 'cdpath' option
* allow :dialog to open the cookies manager
* add 'loadplugins' option
diff --git a/content/bookmarks.js b/content/bookmarks.js
index d2c158fa..946b4a78 100644
--- a/content/bookmarks.js
+++ b/content/bookmarks.js
@@ -267,6 +267,9 @@ liberator.Bookmarks = function () //{{{
//also update bookmark cache
bookmarks.unshift([url, title, keyword, tags || []]);
+
+ liberator.autocommands.trigger("BookmarkPost", "");
+
return true;
},
diff --git a/content/vimperator.js b/content/vimperator.js
index 2f6670f6..a83b3d99 100644
--- a/content/vimperator.js
+++ b/content/vimperator.js
@@ -38,7 +38,8 @@ liberator.config = { //{{{
get visualbellWindow() { return getBrowser().mPanelContainer; },
- autocommands: [["LocationChange", "Triggered when changing tabs or when naviagtion to a new location"],
+ autocommands: [["BookmarkPost", "Triggered after a page is bookmarked"],
+ ["LocationChange", "Triggered when changing tabs or when naviagtion to a new location"],
["PageLoadPre", "Triggered after a page load is initiated"],
["PageLoad", "Triggered when a page gets (re)loaded/opened"],
["QuitPre", "Triggered before exiting Firefox, just before destroying each module"],
diff --git a/locale/en-US/autocommands.txt b/locale/en-US/autocommands.txt
index c677b839..d5cdec8c 100644
--- a/locale/en-US/autocommands.txt
+++ b/locale/en-US/autocommands.txt
@@ -20,6 +20,7 @@ Add {cmd} to the list of commands Vimperator will execute on {event} for a URL m
Available {events}:
`----------------`--------------------------------------------
+*BookmarkPost* Triggered after a page is bookmarked
*LocationChange* Triggered when changing tabs or when navigating to a new location
*PageLoadPre* Triggered after a page load is initiated.
*PageLoad* Triggered when a page gets (re)loaded/opened
@@ -31,6 +32,9 @@ Available {events}:
{pat} is a regular expression, use .* if you want to match all URLs. Note: This
differs from Vim which uses a glob rather than a regexp for {pat}.
+
+Warning: Autocommand events are, in general, currently only fired when
+Vimperator commands are executed.
________________________________________________________________________________
section:Examples[autocmd_examples]