From 4f62f8f6dc950499698e06b9a56025c28f9a331e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 28 Jun 2013 08:30:35 +0400 Subject: add js hook for floating title --- js/PluginHost.js | 1 + js/viewfeed.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/js/PluginHost.js b/js/PluginHost.js index 668d215f9..ae89ba481 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 1c5811fe7..5875a9e48 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 && -- cgit v1.2.3 From c26b93aba509726843a3c1a458f76a24043e6aa6 Mon Sep 17 00:00:00 2001 From: Martin Stone Date: Fri, 28 Jun 2013 09:47:20 +0000 Subject: image.php: Flush headers and output buffer to prevent a leading empty line in some instances. Signed-off-by: Martin Stone --- image.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/image.php b/image.php index dcc7d806d..a134e658e 100644 --- a/image.php +++ b/image.php @@ -41,6 +41,8 @@ header("Content-type: image/png"); $stamp = gmdate("D, d M Y H:i:s", filemtime($filename)). " GMT"; header("Last-Modified: $stamp", true); + ob_clean(); // discard any data in the output buffer (if possible) + flush(); // flush headers (if possible) readfile($filename); } } else { -- cgit v1.2.3