Index: trunk/extensions/UsabilityInitiative/EditWarning/EditWarning.hooks.php |
— | — | @@ -15,19 +15,22 @@ |
16 | 16 | * Initializes the component |
17 | 17 | */ |
18 | 18 | public static function initialize( $out ) { |
19 | | - global $wgEditWarningStyleVersion, $wgRequest; |
| 19 | + global $wgEditWarningStyleVersion, $wgRequest, $wgUser; |
20 | 20 | |
21 | | - UsabilityInitiativeHooks::initialize(); |
22 | | - // Adds script to document |
23 | | - UsabilityInitiativeHooks::addScript( |
24 | | - 'EditWarning/EditWarning.js', $wgEditWarningStyleVersion |
25 | | - ); |
26 | | - // Internationalization |
27 | | - wfLoadExtensionMessages( 'EditWarning' ); |
28 | | - // Adds messages to page |
29 | | - UsabilityInitiativeHooks::addMessages( |
30 | | - array( 'editwarning-warning' ) |
31 | | - ); |
| 21 | + $skin = $wgUser->getSkin(); |
| 22 | + if ( $skin->skinname == 'vector' ) { |
| 23 | + UsabilityInitiativeHooks::initialize(); |
| 24 | + // Adds script to document |
| 25 | + UsabilityInitiativeHooks::addScript( |
| 26 | + 'EditWarning/EditWarning.js', $wgEditWarningStyleVersion |
| 27 | + ); |
| 28 | + // Internationalization |
| 29 | + wfLoadExtensionMessages( 'EditWarning' ); |
| 30 | + // Adds messages to page |
| 31 | + UsabilityInitiativeHooks::addMessages( |
| 32 | + array( 'editwarning-warning' ) |
| 33 | + ); |
| 34 | + } |
32 | 35 | // Continue |
33 | 36 | return true; |
34 | 37 | } |
Index: trunk/extensions/UsabilityInitiative/EditWarning/EditWarning.js |
— | — | @@ -1,9 +1,6 @@ |
2 | 2 | /* JavaScript for EditWarning extension */ |
3 | 3 | |
4 | 4 | js2AddOnloadHook( function() { |
5 | | - // Only use this function in conjuction with the Vector skin |
6 | | - if( skin != 'vector' ) |
7 | | - return; |
8 | 5 | // Get the original values of some form elements |
9 | 6 | $j( '#wpTextbox1, #wpSummary' ).each( function() { |
10 | 7 | $j(this).data( 'origtext', $j(this).val() ); |