User:Psl631/common.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 54:
} );
} );
 
$( document ).ready( function() {
"use strict";
document.getElementById( "pt-logout" ).addEventListener( "click", function( evt ) {
if ( !confirm( "Are you really sure to log out?" ) ) {
evt.preventDefault();
}
} );
} );
 
 
$( document ).ready( function() {
"use strict";
document.getElementById( "wpConfirmB" ).addEventListener( "click", function( evt ) {
if ( !confirm( "Are you sure to delete this page?" ) ) {
evt.preventDefault();
}
} );
} );
 
$( document ).ready( function() {
"use strict";
document.getElementById( "t-upload" ).addEventListener( "click", function( evt ) {
if ( !alert( "Please upload files to <a href="http://commons.wikimedia.org" target="_blank">Commons</a>. Images used here are hosted by Wikimedia Commons." ) ) {
evt.preventDefault();
}
} );
} );
 
 
$( document ).ready( function() {
"use strict";
document.getElementByClass( "mw-rollback-link" ).addEventListener( "click", function( evt ) {
if ( !confirm( "Are you sure to rollback that user's edits?" ) ) {
evt.preventDefault();
}
} );
} );
mw.loader.load('//meta.wikimedia.org/w/index.php?title=Mediawiki:Gadget-popups.js&action=raw&ctype=text/javascript');
 
(mw.loader.getState('ext.gadget.rtrc') ? mw.loader.load('ext.gadget.rtrc') : mw.loader.load('https://www.mediawiki.org/w/load.php?debug=false&modules=ext.gadget.rtrc&lang=' + mw.config.get('wgUserLanguage', 'en')));
215

edits