Index: trunk/extensions/FlaggedRevs/client/flaggedrevs.js |
— | — | @@ -185,6 +185,7 @@ |
186 | 186 | var contentsDiv = document.getElementById("mw-fr-revisioncontents"); |
187 | 187 | var prevLink = document.getElementById("differences-prevlink"); |
188 | 188 | var nextLink = document.getElementById("differences-nextlink"); |
| 189 | + |
189 | 190 | var timeoutId = null; |
190 | 191 | if( contentsDiv ) { |
191 | 192 | var diffUIParams = document.getElementById("mw-fr-diff-dataform"); |
— | — | @@ -192,7 +193,7 @@ |
193 | 194 | var origContents = contentsDiv.innerHTML; |
194 | 195 | contentsDiv.innerHTML = "<span class='loading mw-small-spinner spinner'>" + |
195 | 196 | "</span><span class='loading' >" + wgRevContents.waiting + "</span>"; |
196 | | - var requestArgs = 'action=parse&prop=text|categorieshtml|languageshtml&format=xml'; |
| 197 | + var requestArgs = 'action=parse&prop=text|categorieshtml|languageshtml|headitems&format=xml'; |
197 | 198 | if ( window.wgCurRevisionId == oldRevId && window.wgPageName ) { |
198 | 199 | requestArgs += '&page=' + encodeURIComponent( window.wgPageName ); |
199 | 200 | } else { |
— | — | @@ -207,21 +208,24 @@ |
208 | 209 | success : function( result ) { |
209 | 210 | contentsDiv.innerHTML = ""; |
210 | 211 | contents = jQuery(result).find("text"); |
211 | | - if ( contents && contents.text() ) { |
| 212 | + if ( contents.text() ) { |
212 | 213 | contentsDiv.innerHTML += contents.text(); |
213 | 214 | } else { |
214 | 215 | contentsDiv.innerHTML = wgRevContents.error + " " + origContents; |
215 | 216 | } |
216 | 217 | categoryhtml = jQuery(result).find("categorieshtml"); |
217 | | - if ( categoryhtml && categoryhtml.text() ) { |
| 218 | + if ( categoryhtml.text() ) { |
218 | 219 | contentsDiv.innerHTML += categoryhtml.text(); |
219 | 220 | } |
220 | 221 | languageshtml = jQuery(result).find("languageshtml"); |
221 | | - if ( languageshtml && languageshtml.text() ) { |
| 222 | + if ( languageshtml.text() ) { |
222 | 223 | contentsDiv.innerHTML += "<div class='langlinks' >" + |
223 | 224 | languageshtml.text() + "</div>"; |
224 | 225 | } |
225 | | - |
| 226 | + $headitems = jQuery(result).find("hi"); |
| 227 | + if ( $headitems.text() ) { |
| 228 | + $('head').append( $headitems.text() ); |
| 229 | + } |
226 | 230 | }, |
227 | 231 | error : function(xmlHttpRequest, textStatus, errThrown) { |
228 | 232 | contentsDiv.innerHTML = wgRevContents.error + " " + origContents; |