]> git.wh0rd.org Git - tt-rss.git/commitdiff
add js hook for floating title
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 28 Jun 2013 04:30:35 +0000 (08:30 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 28 Jun 2013 04:30:35 +0000 (08:30 +0400)
js/PluginHost.js
js/viewfeed.js

index 668d215f996d66adb659f29da28d6aa87efa19c1..ae89ba48137cfcfe9de33ca1d680ebab8abe6283 100644 (file)
@@ -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')
index 1c5811fe75a721ccac3ab25828c5e3d73b49decd..5875a9e48cea6c8b5155f7d704e6564b08cf37a4 100644 (file)
@@ -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 &&