"मिडियाविकि:Common.js" को बिचमी भिन्नता
Content deleted Content added
rm unused dependency of jquery.client |
Updating |
||
पंक्ति ५:
* optimized ResourceLoader modules with possibility to add dependencies etc.)
*
* Since
* dependencies, so we have to lazy load them with mw.loader.using on demand and
* then execute the rest in the callback. In most cases these dependencies will
पंक्ति ११:
* dependency hasn't arrived yet it'll make sure those are loaded before this.
*/
mw.loader.using( 'mediawiki.util', function() {
/* Begin of mw.loader.using callback */
/**
Line ५२ ⟶ ३६:
/**
* Map addPortletLink to mw.util
*
* @deprecated: Use mw.util.addPortletLink instead.
*/
mw.log.deprecate( window, 'addPortletLink', mw.util.addPortletLink,
'Use mw.util.addPortletLink instead' ); /** extract a URL parameter from the current URL **********
*
* @deprecated: Use mw.util.getParamValue with proper escaping
*/
window.getURLParamValue = function() {
return mw.util.getParamValue.apply( mw.util, arguments );
};
/** &withCSS= and &withJS= URL parameters *******
* Allow to try custom scripts from MediaWiki space
* without editing personal .css or .js files
*/
var extraCSS = mw.util.getParamValue("withCSS");
if ( extraCSS && extraCSS.match(/^MediaWiki:[^&<>=%]*\.css$/) ) {
importStylesheet(extraCSS);
}
var extraJS = mw.util.getParamValue("withJS");
if ( extraJS && extraJS.match(/^MediaWiki:[^&<>=%]*\.js$/) ) {
importScript(extraJS);
}
/**
* Import more specific scripts if necessary
*/
if ( mw.config.get( 'wgAction' ) === 'edit' || mw.config.get( 'wgAction' ) === 'submit' || mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Upload' ) {
/* scripts specific to editing pages */
importScript( 'MediaWiki:Common.js/edit.js' );
} else if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Watchlist' ) {
/* watchlist scripts */
importScript( 'MediaWiki:Common.js/watchlist.js' );
}
/** WikiMiniAtlas *******************************************************
*
* Description: WikiMiniAtlas is a popup click and drag world map.
* This script causes all of our coordinate links to display the WikiMiniAtlas popup button.
* The script itself is located on meta because it is used by many projects.
* See [[Meta:WikiMiniAtlas]] for more information.
* Maintainers: [[User:Dschwen]]
*/
mw.loader.load('//meta.wikimedia.org/w/index.php?title=MediaWiki:Wikiminiatlas.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400');
/**
* Load scripts specific to Internet Explorer
*/
if ( $.client.profile().name === 'msie' ) {
importScript( 'MediaWiki:Common.js/IEFixes.js' );
}
/**
* Fix for Windows XP Unicode font rendering
*/
if ( navigator.appVersion.search(/windows nt 5/i) !== -1 ) {
mw.util.addCSS( '.IPA { font-family: "Lucida Sans Unicode", "Arial Unicode MS"; } ' +
'.Unicode { font-family: "Arial Unicode MS", "Lucida Sans Unicode"; } ' );
}
/**
* Test if an element has a certain class
*
* @deprecated: Use $(element).hasClass() instead.
*/
mw.log.deprecate( window, 'hasClass', function ( element, className ) {
return $( element ).hasClass( className );
}, 'Use jQuery.hasClass() instead' );
// Interwiki links to featured articles
mw.loader.load('//en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-featured-articles-links.js&action=raw&ctype=text/javascript');
/**
* Collapsible tables
*
* Allows tables to be collapsed, showing only the header. See [[
*
* @version 2.0.3 (2014-03-14)
Line १३७ ⟶ १२९:
var autoCollapse = 2;
var collapseCaption = '
var expandCaption = '
var tableIndex = 0;
Line १५१ ⟶ १४३:
var Rows = Table.rows;
var i;
if ( Button.firstChild.data === collapseCaption ) {
Line १६० ⟶ १५१:
} else {
for ( i = 1; i < Rows.length; i++ ) {
Rows[i].style.display =
}
Button.firstChild.data = collapseCaption;
Line २३४ ⟶ २२५:
mw.hook( 'wikipage.content' ).add( createCollapseButtons );
/**
* Dynamic Navigation Bars (experimental)
Line ३६८ ⟶ ३२९:
mw.hook( 'wikipage.content' ).add( createNavigationBarToggleButton );
/**
* Main Page layout fixes
*
* Description: Adds an additional link to the complete list of languages available.
* Maintainers: [[User:AzaToth]], [[User:R. Koot]], [[User:Alex Smotrov]]
*/
if ( mw.config.get( 'wgPageName' ) === 'सम्मुख_पन्ना' || mw.config.get( 'wgPageName' ) === 'वार्ता:सम्मुख_पन्ना' ) {
$( function () {
mw.util.addPortletLink( 'p-lang', '//meta.wikimedia.org/wiki/List_of_Wikipedias/bn?uselang=mai',
'पूर्ण तालिका', 'interwiki-completelist', 'सब विकिपिडियाक सूची' );
} );
}
/**
* Uploadwizard_newusers
Line ३९५ ⟶ ३७०:
}
}
$(uploadwizard_newusers);
Line ४१८ ⟶ ३९३:
$( function () {
var cats =
if ( !cats ) {
return;
}
cats = cats.getElementsByTagName( 'a' );
for ( var i = 0; i < cats.length; i++ ) {
if ( cats[i].title === 'श्रेणी:जीवित लोग' || cats[i].title === 'श्रेणी:सम्भावित जीवित लोग' ) {
addEditIntro( 'Template:BLP_editintro' );
break;
}
}
} );
}
/**
* Description: Stay on the secure server as much as possible
* Maintainers: [[User:TheDJ]]
*/
if ( document.location && document.location.protocol === 'https:' ) {
/* New secure servers */
importScript( 'MediaWiki:Common.js/secure new.js' );
}
/* End of mw.loader.using callback */
} );
/* अहिसँ निचा पङ्क्ति नै जोडी */
|