--- /dev/null
+var addon_hooks={};
+
+function Addon_registerHook( type, hookfnstr )
+{
+ if (!addon_hooks.hasOwnProperty(type)) {
+ addon_hooks[type]=[];
+ }
+
+ addon_hooks[type].push( hookfnstr );
+
+ console.log("addon_hooks type "+type+" has "+addon_hooks[type].length+" hooks registered");
+}
timer = setTimeout(NavUpdate, updateInterval);
}
+function callAddonHooks(typeOfHook) {
+ if (typeof addon_hooks !== 'undefined') {
+ var myTypeOfHooks = addon_hooks[typeOfHook];
+ if (typeof myTypeOfHooks !== 'undefined') {
+ for (addon_hook_idx = 0; addon_hook_idx < myTypeOfHooks.length; addon_hook_idx++) {
+ var hookfnstr = myTypeOfHooks[addon_hook_idx];
+ var hookfn = window[hookfnstr];
+ if (typeof hookfn === "function") hookfn();
+ }
+ }
+ }
+}
+
function liveUpdate(src) {
if ((src == null) || stopped || !profile_uid) {
$('.like-rotator').hide(); return;
prev = ident;
});
+ callAddonHooks("postprocess");
+
$('.like-rotator').hide();
if (commentBusy) {
commentBusy = false;
$(".comment-edit-form textarea").editor_autocomplete(baseurl+"/acl");
/* autocomplete bbcode */
$(".comment-edit-form textarea").bbco_autocomplete('bbcode');
+
});
+
}
function imgbright(node) {
<script type="text/javascript" src="view/asset/perfect-scrollbar/js/perfect-scrollbar.jquery.min.js" ></script>
<script type="text/javascript" src="view/js/acl.js" ></script>
<script type="text/javascript" src="view/asset/base64/base64.min.js" ></script>
+<script type="text/javascript" src="view/js/addon-hooks.js" ></script>
+{{foreach $addon_hooks as $addon_hook}}
+<script type="text/javascript" src="addon/{{$addon_hook}}/{{$addon_hook}}.js"></script>
+{{/foreach}}
<script type="text/javascript" src="view/js/main.js" ></script>
<script>