##// 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 updateMetadataPanel();
121 updateMetadataPanel();
122 }
122 }
123
123
124 updateBumplimitProgress(addedPostCount);
124 if (addedPostCount > 0) {
125 showNewPostsTitle(addedPostCount);
125 updateBumplimitProgress(addedPostCount);
126 }
127
128 if (updatedPosts.length > 0) {
129 showNewPostsTitle(addedPostCount);
130 }
126
131
127 // TODO Process removed posts if any
132 // TODO Process removed posts if any
128 $('.metapanel').attr('data-last-update', data.last_update);
133 $('.metapanel').attr('data-last-update', data.last_update);
@@ -254,7 +259,14 b' function showNewPostsTitle(newPostCount)'
254 documentOriginalTitle = document.title;
259 documentOriginalTitle = document.title;
255 }
260 }
256 unreadPosts = unreadPosts + newPostCount;
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 document.addEventListener('visibilitychange', function() {
271 document.addEventListener('visibilitychange', function() {
260 if (documentOriginalTitle !== '') {
272 if (documentOriginalTitle !== '') {
General Comments 0
You need to be logged in to leave comments. Login now