User:Pavithrah/common.js

$('a').css('color', 'green'); $('#n-mainpage-description').text("Main Page Pavithra").css('color', 'violet'); $("a[title='Wikipedia']").css('color', 'pink'); //importScript('User:Pavithrah/sample.js'); mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Harsh4101991/EditCount.js&action=raw&ctype=text/javascript'); //importScript('User:Harsh4101991/EditCount.js'); mw.loader.load("//en.wikipedia.org/w/index.php?title=User:Lupin/popups.js&action=raw&ctype=text/JavaScript"); importScript('Mediawiki:Gadget-ReferenceTooltips.js'); importStylesheet('Mediawiki:Gadget-ReferenceTooltips.css');

mw.loader.using('mediawiki.api', function{	var api = new mw.Api;	///w/api.php?action=query&list=users&format=json&usprop=editcount&ususers=Harsh4101991	api.get({ action:'query', list:'users', format:'json', usprop:'editcount', ususers: wgUserName })	.done(function(data){ //alert('Successfully fetch data'); console.log(data); //alert('My contribution' + data.query.users[0].editcount); }) })

mw.loader.using('mediawiki.api', function{	var api = new mw.Api;	///w/api.php?action=query&list=users&format=json&usprop=editcount&ususers=Harsh4101991	api.get({ action:'query', list: 'users', format:'json', usprop:'editcount', ususers:'Harsh4101991' })	.done(function(data){ console.log(data); // alert(data.query.users[0].editcount); x = data.query.users[0].editcount; })	//mw.notify( 'This is a notification.' );	var link = mw.util.addPortletLink( 'p-views', '#',		'Edit Count', 't-prettylinkwidget', 'Show Edit Count of User', null, '#t-whatlinkshere' );	$(link).click( function( e ) { // Avoid the browser going to '#' e.preventDefault; //Adding Dialog mw.loader.using( 'jquery.ui', function {  			$dialog = $('  ')			.html('Your Edit Count is : '+ x)			.dialog({ autoOpen: true, title: 'Thanks For Your Contribution', width: '70%', modal: true, });		});		//END }); })

//importScript('User:Harsh4101991/EditCount.js'); /* var link = mw.util.addPortletLink(			'p-tb',			'#',			'Language Support',			't-prettylinkwidget',			'Show Edit Count of User',			null,			'#t-whatlinkshere'		);