Changeset 33982
- Timestamp:
- 09/10/2015 01:02:05 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/edit-comments.js
r33821 r33982 139 139 140 140 updateHtmlTitle = function ( diff ) { 141 var newTitle, regExMatch, titleCount ;141 var newTitle, regExMatch, titleCount, commentFrag; 142 142 143 143 titleRegEx = titleRegEx || new RegExp( 'Comments (\\([0-9' + thousandsSeparator + ']+\\))?' ); … … 146 146 newTitle = adminTitle; 147 147 148 titleDiv.html( document.title ); 149 titleCount = getCount( titleDiv ) + diff; 148 commentFrag = titleRegEx.exec( document.title ); 149 if ( commentFrag ) { 150 commentFrag = commentFrag[0]; 151 titleDiv.html( commentFrag ); 152 titleCount = getCount( titleDiv ) + diff; 153 } else { 154 titleDiv.html( 0 ); 155 titleCount = diff; 156 } 157 150 158 if ( titleCount >= 1 ) { 151 159 updateCount( titleDiv, titleCount );
Note: See TracChangeset
for help on using the changeset viewer.