sadasya:SM7/common.js: ke revisions ke biich ke antar

Content deleted Content added
SM7 (Baat | yogdaan)
local
SM7 (Baat | yogdaan)
removed unnecessary
Rekha 287:
 
mw.hook( 'wikipage.content' ).add( createNavigationBarToggleButton );
 
/**
* Magic editintros ****************************************************
*
* Description: Adds editintros on disambiguation pages and BLP pages.
* Maintainers: [[User:RockMFR]]
*/
function addEditIntro( name ) {
$( '.mw-editsection, #ca-edit' ).find( 'a' ).each( function ( i, el ) {
el.href = $( this ).attr( 'href' ) + '&editintro=' + name;
} );
}
 
if ( mw.config.get( 'wgNamespaceNumber' ) === 0 ) {
$( function () {
if ( document.getElementById( 'disambigbox' ) ) {
addEditIntro( 'Template:Disambig_editintro' );
}
} );
 
$( function () {
var cats = mw.config.get('wgCategories');
if ( !cats ) {
return;
}
if ( $.inArray( 'जियत लोग', cats ) !== -1 || $.inArray( 'साइत जियत लोग', cats ) !== -1 ) {
addEditIntro( 'Template:BLP_editintro' );
}
} );
}
 
/* Actions specific to the edit page */
if ( mw.config.get( 'wgAction' ) === 'edit' || mw.config.get( 'wgAction' ) === 'submit' ) {
/**
* Fix edit summary prompt for undo
*
* Fixes the fact that the undo function combined with the "no edit summary prompter"
* complains about missing editsummary, if leaving the edit summary unchanged.
* Added by [[User:Deskana]], code by [[User:Tra]].
* See also [[phab:T10912]].
*/
$(function () {
if (document.location.search.indexOf('undo=') !== -1 && document.getElementsByName('wpAutoSummary')[0]) {
document.getElementsByName('wpAutoSummary')[0].value = '1';
}
});
}
 
/* End of mw.loader.using callback */