From: Andrew Dolgov Date: Fri, 28 Jun 2013 04:30:35 +0000 (+0400) Subject: add js hook for floating title X-Git-Tag: 1.9~80 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=4f62f8f6dc950499698e06b9a56025c28f9a331e;p=tt-rss.git add js hook for floating title --- diff --git a/js/PluginHost.js b/js/PluginHost.js index 668d215f..ae89ba48 100644 --- a/js/PluginHost.js +++ b/js/PluginHost.js @@ -10,6 +10,7 @@ var PluginHost = { HOOK_ARTICLE_COLLAPSED: 7, HOOK_PARAMS_LOADED: 8, HOOK_RUNTIME_INFO_LOADED: 9, + HOOK_FLOATING_TITLE: 10, hooks: [], register: function (name, callback) { if (typeof(this.hooks[name]) == 'undefined') diff --git a/js/viewfeed.js b/js/viewfeed.js index 1c5811fe..5875a9e4 100644 --- a/js/viewfeed.js +++ b/js/viewfeed.js @@ -2226,6 +2226,8 @@ function updateFloatingTitle() { if (child.id != $("floatingTitle").getAttribute("rowid")) { $("floatingTitle").setAttribute("rowid", child.id); $("floatingTitle").innerHTML = header.innerHTML; + + PluginHost.run(PluginHost.HOOK_FLOATING_TITLE, child); } if (child.offsetTop < hf.scrollTop - header.offsetHeight - 100 &&