Index: trunk/extensions/FlaggedRevs/client/flaggedrevs.js |
— | — | @@ -189,7 +189,7 @@ |
190 | 190 | var oldRevId = diffUIParams.getElementsByTagName('input')[1].value; |
191 | 191 | var origContents = contentsDiv.innerHTML; |
192 | 192 | contentsDiv.innerHTML = "<span class='loading mw-small-spinner spinner'></span><span class='loading' >" + wgRevContents.waiting + "</span>"; |
193 | | - var requestArgs = 'action=parse&prop=text&format=xml'; |
| 193 | + var requestArgs = 'action=parse&prop=text|categorieshtml|languageshtml&format=xml'; |
194 | 194 | if ( window.wgCurRevisionId == oldRevId && window.wgPageName ) { |
195 | 195 | requestArgs += '&page=' + encodeURIComponent( window.wgPageName ); |
196 | 196 | } else { |
— | — | @@ -202,12 +202,22 @@ |
203 | 203 | data : requestArgs, |
204 | 204 | dataType: "xml", |
205 | 205 | success : function( result ) { |
| 206 | + contentsDiv.innerHTML = ""; |
206 | 207 | contents = jQuery(result).find("text"); |
207 | 208 | if ( contents && contents.text() ) { |
208 | | - contentsDiv.innerHTML = contents.text(); |
| 209 | + contentsDiv.innerHTML += contents.text(); |
209 | 210 | } else { |
210 | 211 | contentsDiv.innerHTML = wgRevContents.error + " " + origContents; |
211 | 212 | } |
| 213 | + categoryhtml = jQuery(result).find("categorieshtml"); |
| 214 | + if ( categoryhtml && categoryhtml.text() ) { |
| 215 | + contentsDiv.innerHTML += categoryhtml.text(); |
| 216 | + } |
| 217 | + languageshtml = jQuery(result).find("languageshtml"); |
| 218 | + if ( languageshtml && languageshtml.text() ) { |
| 219 | + contentsDiv.innerHTML += languageshtml.text(); |
| 220 | + } |
| 221 | + |
212 | 222 | }, |
213 | 223 | error : function(xmlHttpRequest, textStatus, errThrown) { |
214 | 224 | contentsDiv.innerHTML = wgRevContents.error + " " + origContents; |
— | — | @@ -236,5 +246,4 @@ |
237 | 247 | FlaggedRevs.getRevisionContents(); |
238 | 248 | }; |
239 | 249 | |
240 | | -//TODO figure out the correct way to do this |
241 | 250 | window.onload = FlaggedRevs.setJSTriggers; |