User:ScitDei/common.js

//https://meta.wikimedia.org/wiki/User:TMg/autoFormatter autoFormatter mw.loader.load("//de.wikipedia.org/w/index.php?title=Benutzer:TMg/autoFormatter.js&action=raw&ctype=text/javascript");

// Add WP:Reflinks launcher in the toolbox on left $.when( mw.loader.using( ['mediawiki.util'] ), $.ready ).then(function { mw.util.addPortletLink( "p-tb",    // toolbox portlet "https://dispenser.info.tm/~dispenser/cgi-bin/reflinks.py?lang=" + mw.config.get('wgContentLanguage') + "&page=" + mw.config.get('wgPageName') + "&autoclick=wpPreview", // updated tool URL as of 9 November 2017 "Reflinks" // link label )}); // Add WP:Checklinks launcher in the toolbox on left // website for checklinks: -- http://dispenser.homenet.org/~dispenser/cgi-bin/webchecklinks.py?page= addOnloadHook(function checklinks { mw.util.addPortletLink( "p-tb",    // toolbox portlet "https://dispenser.info.tm/~dispenser/cgi-bin/webchecklinks.py?page=" + mw.config.get('wgPageName'), "Checklinks" // link label )}); // If you want to use this script(seectioon reference preview), simply add the following line to your monobook.js: importScript('User:Anomie/ajaxpreview.js'); // Linkback: User:Anomie/ajaxpreview.js //Format checker AutoEd importScript('Wikipedia:AutoEd/complete.js'); //Red Link Checker and Autofix //mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Topbanana/RLRL_SR_Utility.js&action=raw&ctype=text/javascript');

// website for RedlinkChecker: -- http://tools.wmflabs.org/tb-dev/RLRL/checkpage.php addOnloadHook(function redlinkchecker { mw.util.addPortletLink( "p-tb",    // toolbox portlet "http://tools.wmflabs.org/tb-dev/RLRL/checkpage.php?ns=0&title=" + mw.config.get('wgPageName') + "&depth=2&project=wiki&lang=" + mw.config.get('wgContentLanguage'), "RedLinkChecker" // link label )}); //Added reFill mw.loader.load( "https://meta.wikimedia.org/w/index.php?title=User:Zhaofeng_Li/Reflinks.js&action=raw&ctype=text/javascript" );

//Igloo //importScript('Wikipedia:Igloo/gloo.js'); // Igloo but cant use without rollback privelage //Adding autoPeerReview importScript('User:AndyZ/peerreviewer.js'); //User:AndyZ/peerreviewer.js

// Add Google translate launcher in the toolbox on left addOnloadHook(function ggltranslate { mw.util.addPortletLink( "p-tb",    // toolbox portlet "https://translate.google.com/translate?sl=auto&tl=hi&js=y&prev=_t&hl=en&ie=UTF-8&u=https://en.wikipedia.org/wiki/" + mw.config.get('wgPageName'), "Google Translate this article" // link label )}); // Trying to Add Google coordinates in the toolbox on left /////New way of doing it/////////////////////////////////// First wait for mediawik.util to load, and the page to be ready. $.when( mw.loader.using( ['mediawiki.util']), $.ready ).then(function { ///// General usage: /////   mw.util.addPortletLink( portletId, href, text [, id [, tooltip [, accesskey [, nextnode ]]]] ); /////} // Create portlet link var geocords = mw.util.addPortletLink( 'p-tb', '#',	'GeoCoordify', 'ca-my-portlet',	'Find this place in Google maps'); // Bind click handler $( geocords ).click( function ( e ) { e.preventDefault; window.open('https://www.google.co.in/maps/place/' + mw.config.get('wgPageName'), '_blank'); //var targeturi = window.location.href; //var res = targeturi.substring(targeturi.indexOf("@")); //var req = res.substring(0, res.indexOf("/")); //var lol = prompt("Is the map showing the correct place?",req); //if (lol!= null){alert("Coordinates are :" + req);} //importScript('User:ScitDei/GeoCordTool.css'); //importScript('User:ScitDei/GeoCoordTool.js'); //alert( 'It works!' ); }); });