r76237 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76236‎ | r76237 | r76238 >
Date:09:44, 7 November 2010
Author:catrope
Status:deferred
Tags:
Comment:
Superficially fix up the WikiSync extension to work with ResourceLoader. Closed an unclosed iframe tag in the special page output and exported a few variables to the global scope using window.varname .
Modified paths:
  • /trunk/extensions/WikiSync/WikiSync.js (modified) (history)
  • /trunk/extensions/WikiSync/WikiSyncPage.php (modified) (history)
  • /trunk/extensions/WikiSync/WikiSync_utils.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WikiSync/WikiSyncPage.php
@@ -154,7 +154,9 @@
155155 ),
156156 array( '__tag'=>'tr',
157157 array( '__tag'=>'td', 'colspan'=>'2',
158 - array( '__tag'=> 'iframe', 'id'=>'wikisync_iframe', 'style' => 'width:100%; height:200px; display:none; ' )
 158+ // Have to explicitly set empty contents for the iframe, or we'll produce
 159+ // <iframe /> which browsers consider an unclosed tag
 160+ array( '__tag'=> 'iframe', 'id'=>'wikisync_iframe', 'style' => 'width:100%; height:200px; display:none; ', '' )
159161 )
160162 )
161163 );
Index: trunk/extensions/WikiSync/WikiSync_utils.js
@@ -1,4 +1,4 @@
2 -var WikiSyncUtils = {
 2+window.WikiSyncUtils = {
33 // browser-independent addevent function
44 addEvent : function ( obj, type, fn ) {
55 if ( document.getElementById && document.createTextNode ) {
@@ -38,7 +38,7 @@
3939 * percents indicator class
4040 * @param id - id of table container for percents indicator
4141 */
42 -function WikiSyncPercentsIndicator( id ) {
 42+window.WikiSyncPercentsIndicator = function( id ) {
4343 this.topElement = document.getElementById( id );
4444 var tr1 = this.topElement.firstChild.firstChild;
4545 // description line will be stored there
Index: trunk/extensions/WikiSync/WikiSync.js
@@ -33,7 +33,7 @@
3434 * @addtogroup Extensions
3535 */
3636
37 -var WikiSync = {
 37+window.WikiSync = {
3838
3939 _WikiSync : '', // WikiSync context
4040
@@ -969,4 +969,4 @@
970970
971971 }
972972
973 -WikiSyncUtils.addEvent(window,"load",WikiSync.onloadHandler);
 973+WikiSyncUtils.addEvent(window,"load", WikiSync.onloadHandler);

Status & tagging log