diff options
author | yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> | 2019-09-26 15:01:25 +0000 |
---|---|---|
committer | yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> | 2019-09-26 15:01:25 +0000 |
commit | 5e2a13d5810e4c95d36b24f0c72f94f87f8b3bf3 (patch) | |
tree | e3d5f8dd7f80c9e5e7874dd8b7cdb2e606bbd481 | |
parent | 388eeb5b4dfd246bfddf8ea4b7172696646ad702 (diff) | |
download | Post-SMTP-5e2a13d5810e4c95d36b24f0c72f94f87f8b3bf3.zip |
stupid svn stuff - deleted by mistake
-rw-r--r-- | script/post-smtp-hooks.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/script/post-smtp-hooks.js b/script/post-smtp-hooks.js new file mode 100644 index 0000000..6607f68 --- /dev/null +++ b/script/post-smtp-hooks.js @@ -0,0 +1,15 @@ +var Hook = { + hooks: [], + + register: function ( name, callback ) { + if( 'undefined' == typeof( Hook.hooks[name] ) ) + Hook.hooks[name] = [] + Hook.hooks[name].push( callback ) + }, + + call: function ( name, arguments ) { + if( 'undefined' != typeof( Hook.hooks[name] ) ) + for( i = 0; i < Hook.hooks[name].length; ++i ) + if( true != Hook.hooks[name][i]( arguments ) ) { break; } + } +} |