diff options
author | Andrew Dolgov <[email protected]> | 2006-05-21 02:48:17 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2006-05-21 02:48:17 +0100 |
commit | 0a17ba5eea0ff295b009e7a30b98fbb3b8c118ff (patch) | |
tree | a9ddb0f1aaaa92428fb46a238deaa1f9481fb9b9 | |
parent | 59a543f0ee39ffce6f74856e0ae261fbe5bfac80 (diff) |
fix broken counter update after view/viefeed
-rw-r--r-- | backend.php | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/backend.php b/backend.php index 1daf49aa0..9fb06b605 100644 --- a/backend.php +++ b/backend.php @@ -659,7 +659,11 @@ print "</div>"; print "<script type=\"text/javascript\"> - update_all_counters('$feed_id'); + try { + parent.update_all_counters('$feed_id'); + } catch (e) { + exception_error('view/footer', e); + } </script>"; } @@ -1212,27 +1216,28 @@ print "</div>"; - print "<script type=\"text/javascript\"> - document.onkeydown = hotkey_handler; - // if (parent.daemon_enabled) parent.updateTitle('$feed_title'); - update_all_counters('$feed'); - </script>"; - - print ' - <script type="text/javascript"> + print " + <script type=\"text/javascript\"> + try { + document.onkeydown = hotkey_handler; + parent.update_all_counters(\"$feed\"); + } catch (e) { + exception_error(\"viewfeed/footer1\", e); + } + /* for IE */ function statechange() { - if (document.readyState == "interactive") init(); + if (document.readyState == \"interactive\") init(); } - + if (document.readyState) { - if (document.readyState == "interactive" || document.readyState == "complete") { + if (document.readyState == \"interactive\" || document.readyState == \"complete\") { init(); } else { document.onreadystatechange = statechange; } } - </script>'; + </script>"; print "</body></html>"; } |