מדיה ויקי:Common.js: הבדלים בין גרסאות בדף

Make the table appear only after the collapsible styles are loaded, so that it won't delay showing the search results
מירכאות אחידות
שורה 13: שורה 13:
for ( var arg = 0; arg < args.length; arg++ ) {
for ( var arg = 0; arg < args.length; arg++ ) {
try {
try {
importScript( "MediaWiki:סקריפטים/" + args[arg] + ".js" );
importScript( 'MediaWiki:סקריפטים/' + args[arg] + '.js' );
}
}
catch(e) {
catch( e ) {
}
}
}
}
שורה 153: שורה 153:
}
}


// create an event when "addportellink" is called, so scripts that manipulate menus ca readjust.
// create an event when addPortletLink() is called, so scripts that manipulate menus ca readjust.
var oldFunc = mw.util.addPortletLink;
var oldFunc = mw.util.addPortletLink;
if ( typeof oldFunc === 'function' ) {
if ( typeof oldFunc === 'function' ) {
שורה 166: שורה 166:


if ( $.inArray( mw.config.get( 'wgPageName' ), [
if ( $.inArray( mw.config.get( 'wgPageName' ), [
"ויקיפדיה:בוקמרקלטים",
'ויקיפדיה:בוקמרקלטים',
"שיחת_ויקיפדיה:בוקמרקלטים"
'שיחת_ויקיפדיה:בוקמרקלטים'
] ) + 1 ) {   
] ) + 1 ) {   
importScript( 'MediaWiki:bookmarkletsInit.js' ); // דף הבוקמרקלטים
importScript( 'MediaWiki:bookmarkletsInit.js' ); // דף הבוקמרקלטים
שורה 186: שורה 186:


/*
/*
* Adds an automatic "{{תב|מוגן}}" or "{{תב|מוגן חלקית}}" template when the page is protected.
* Adds an automatic '{{תב|מוגן}}' or '{{תב|מוגן חלקית}}' template when the page is protected.
* You can use the {{תב|ללא הודעת הגנה אוטומטית}} to prevent the protection notice from being inserted.
* You can use the {{תב|ללא הודעת הגנה אוטומטית}} to prevent the protection notice from being inserted.
*
*
שורה 263: שורה 263:
} );
} );


// if paramvalidator wrappers are visible, add "close" button, make them close on click, and tile them.
// if paramvalidator wrappers are visible, add a 'close' button, make them close on click, and tile them.
mw.hook( 'wikipage.content' ).add( function( content ) {
mw.hook( 'wikipage.content' ).add( function( content ) {
$( '.paramvalidator-wrapper:visible',  content )
$( '.paramvalidator-wrapper:visible',  content )
שורה 278: שורה 278:
.click( function() {  
.click( function() {  
var $this = $( this );  
var $this = $( this );  
$this.slideUp( "slow", function() { $this.remove(); } );  
$this.slideUp( 'slow', function() { $this.remove(); } );  
} );
} );