##// END OF EJS Templates
Show new posts count title only if there are new posts. But show an asterisk...
neko259 -
r1127:b9ff48e5 default
parent child Browse files
Show More
@@ -121,8 +121,13 b' function getThreadDiff() {'
121 121 updateMetadataPanel();
122 122 }
123 123
124 if (addedPostCount > 0) {
124 125 updateBumplimitProgress(addedPostCount);
126 }
127
128 if (updatedPosts.length > 0) {
125 129 showNewPostsTitle(addedPostCount);
130 }
126 131
127 132 // TODO Process removed posts if any
128 133 $('.metapanel').attr('data-last-update', data.last_update);
@@ -254,7 +259,14 b' function showNewPostsTitle(newPostCount)'
254 259 documentOriginalTitle = document.title;
255 260 }
256 261 unreadPosts = unreadPosts + newPostCount;
257 document.title = '[' + unreadPosts + '] ' + documentOriginalTitle;
262
263 var newTitle = '* ';
264 if (unreadPosts > 0) {
265 newTitle += '[' + unreadPosts + '] ';
266 }
267 newTitle += documentOriginalTitle;
268
269 document.title = newTitle;
258 270
259 271 document.addEventListener('visibilitychange', function() {
260 272 if (documentOriginalTitle !== '') {
General Comments 0
You need to be logged in to leave comments. Login now