Index: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js |
— | — | @@ -13,8 +13,8 @@ |
14 | 14 | if ( $j.wikiEditor != undefined && $j.wikiEditor.isSupported() || !$j.wikiEditor.isSupportKnown() ) { |
15 | 15 | // Remove the old toolbar |
16 | 16 | $j( '#toolbar' ).remove(); |
17 | | - // Build a wikiEditor around the textarea |
18 | | - $j( 'textarea#wpTextbox1' ).wikiEditor( { |
| 17 | +// Add toolbar module |
| 18 | +$j( '#wpTextbox1' ).wikiEditor( 'addModule', { |
19 | 19 | |
20 | 20 | 'toolbar': { |
21 | 21 | // Main section |
— | — | @@ -849,9 +849,11 @@ |
850 | 850 | // All of these are potentially valid titles, and the latter three |
851 | 851 | // categories match about 6300 titles in enwiki's ns0. Out of 6.9M |
852 | 852 | // titles, that's 0.09% |
853 | | - if ( typeof arguments.callee.regex == 'undefined' ) |
| 853 | + if ( typeof arguments.callee.regex == 'undefined' ) { |
854 | 854 | // Cache the regex |
855 | | - arguments.callee.regex = new RegExp( "(^(" + urlprotocols + "))|(^www\\.)|([^.]\\.[a-z]{2,}($|\\/))", 'i'); |
| 855 | + arguments.callee.regex = |
| 856 | + new RegExp( "(^(" + urlprotocols + "))|(^www\\.)|([^.]\\.[a-z]{2,}($|\\/))", 'i'); |
| 857 | + } |
856 | 858 | return s.match( arguments.callee.regex ); |
857 | 859 | } |
858 | 860 | // Updates the UI to show if the page title being inputed by the user exists or not |
— | — | @@ -1557,6 +1559,7 @@ |
1558 | 1560 | } |
1559 | 1561 | } |
1560 | 1562 | } |
1561 | | -} |
| 1563 | +} } ); |
1562 | 1564 | |
1563 | | -} ); } } ); |
| 1565 | +} } ); |
| 1566 | + |