'localBasePath' => $GLOBALS['wgStyleDirectory'],
'dependencies' => 'mediawiki.language',
'messages' => array( 'showtoc', 'hidetoc' ),
+ 'position' => 'bottom',
),
'mediawiki.legacy.wikiprintable' => array(
'styles' => array( 'common/wikiprintable.css' => array( 'media' => 'print' ) ),
-// MediaWiki JavaScript support functions
+/**
+ * MediaWiki legacy wikibits
+ */
+(function(){
window.clientPC = navigator.userAgent.toLowerCase(); // Get client info
window.is_gecko = /gecko/.test( clientPC ) &&
}
// Global external objects used by this script.
-/*extern ta, stylepath, skin */
+/*extern ta */
// add any onload functions in this hook (please don't hard-code any events in the xhtml source)
window.doneOnloadHook = undefined;
};
// Special stylesheet links for Monobook only (see bug 14717)
-if ( typeof stylepath != 'undefined' && skin == 'monobook' ) {
+var skinpath = mw.config.get( 'stylepath' ) + '/' + mw.config.get( 'skin' );
+if ( mw.config.get( 'skin' ) === 'monobook' ) {
if ( opera6_bugs ) {
- importStylesheetURI( stylepath + '/' + skin + '/Opera6Fixes.css' );
+ importStylesheetURI( skinpath + '/Opera6Fixes.css' );
} else if ( opera7_bugs ) {
- importStylesheetURI( stylepath + '/' + skin + '/Opera7Fixes.css' );
+ importStylesheetURI( skinpath + '/Opera7Fixes.css' );
} else if ( opera95_bugs ) {
- importStylesheetURI( stylepath + '/' + skin + '/Opera9Fixes.css' );
+ importStylesheetURI( skinpath + '/Opera9Fixes.css' );
} else if ( ff2_bugs ) {
- importStylesheetURI( stylepath + '/' + skin + '/FF2Fixes.css' );
+ importStylesheetURI( skinpath + '/FF2Fixes.css' );
}
}
-
-if ( 'wgBreakFrames' in window && window.wgBreakFrames ) {
+if ( mw.config.get( 'wgBreakFrames' ) ) {
// Un-trap us from framesets
if ( window.top != window ) {
window.top.location = window.location;
window.injectSpinner = function( element, id ) {
var spinner = document.createElement( 'img' );
spinner.id = 'mw-spinner-' + id;
- spinner.src = stylepath + '/common/images/spinner.gif';
+ spinner.src = mw.config.get( 'stylepath' ) + '/common/images/spinner.gif';
spinner.alt = spinner.title = '...';
if( element.nextSibling ) {
element.parentNode.insertBefore( spinner, element.nextSibling );
hookEvent( 'load', runOnloadHook );
if ( ie6_bugs ) {
- importScriptURI( stylepath + '/common/IEFixes.js' );
+ importScriptURI( mw.config.get( 'stylepath' ) + '/common/IEFixes.js' );
}
+
+})();