User:Jeph paul/common.js

function newTab{ if(mw.config.get('wgIsArticle')){ mw.util.addPortletLink( 'p-views', '#', 'Replay Edits','t-mworg', 'Visualize the edits of an article', 'm', '#t-print' ); } var addClick = function{ $('#t-mworg').click(function(e){	 		e.preventDefault;	  		var layout ='                              ?     ';	  		$('#content').html(layout);	  		loadTool;	  		$('#content').addClass('replayEdit');	  		$('#pageTitle').val(mw.config.get('wgPageName'));	  		start('#pageTitle');	  }); }; //Getting the lib files d3Promise = jQuery.getScript('https://en.wikipedia.org/w/index.php?title=User:Jeph_paul/d3.v3.min.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400'); jQueryPromise = jQuery.getScript('https://en.wikipedia.org/w/index.php?title=User:Jeph_paul/jquery-2.0.2.min.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400'); diffMatchPatchPromise = jQuery.getScript('https://en.wikipedia.org/w/index.php?title=User:Jeph_paul/diff_match_patch.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400'); $.when(d3Promise,jQueryPromise,diffMatchPatchPromise).then(function{ 																visualisationPromise = jQuery.getScript('https://en.wikipedia.org/w/index.php?title=User:Jeph_paul/visualisationscript.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400');  																$.when(visualisationPromise).then(function{ addClick; }); 															}); } newTab;