diff options
Diffstat (limited to 'public/scripts')
| -rw-r--r-- | public/scripts/global_view.js | 4 | ||||
| -rw-r--r-- | public/scripts/main.js | 12 |
2 files changed, 11 insertions, 5 deletions
diff --git a/public/scripts/global_view.js b/public/scripts/global_view.js index 2c95bdfb7..94580dc0d 100644 --- a/public/scripts/global_view.js +++ b/public/scripts/global_view.js @@ -35,11 +35,13 @@ function init_close_panel() { init_close_panel(); $("#panel").slideToggle(); $("#overlay").fadeOut(); + + return false; }); } function init_global_view() { - $("#stream .category a").click(function () { + $("#stream .box-category a").click(function () { var link = $(this).attr("href"); load_panel(link); diff --git a/public/scripts/main.js b/public/scripts/main.js index 21831bc9b..b86b1c856 100644 --- a/public/scripts/main.js +++ b/public/scripts/main.js @@ -68,15 +68,19 @@ function mark_read(active, only_not_read) { //Update unread: all if (feed_priority > 0) { elem = $('#aside_flux .all').children(':first').get(0); - feed_unread = elem ? (parseInt(elem.getAttribute('data-unread'), 10) || 0) : 0; - elem.setAttribute('data-unread', Math.max(0, feed_unread + inc)); + if (elem) { + feed_unread = elem ? (parseInt(elem.getAttribute('data-unread'), 10) || 0) : 0; + elem.setAttribute('data-unread', Math.max(0, feed_unread + inc)); + } } //Update unread: favourites if (active.closest('div').hasClass('favorite')) { elem = $('#aside_flux .favorites').children(':first').get(0); - feed_unread = elem ? (parseInt(elem.getAttribute('data-unread'), 10) || 0) : 0; - elem.setAttribute('data-unread', Math.max(0, feed_unread + inc)); + if (elem) { + feed_unread = elem ? (parseInt(elem.getAttribute('data-unread'), 10) || 0) : 0; + elem.setAttribute('data-unread', Math.max(0, feed_unread + inc)); + } } //Update unread: title |
