User:Sarthak Kundra/common.js

importScript('User:Numbermaniac/goToTop.js'); mw.loader.load( '/w/index.php?title=User:Sarthak_Kundra/task1.js&action=raw&ctype=text/javascript' ); mw.loader.load( '/w/index.php?title=User:Sarthak_Kundra/MediaWiki:Guidedtour-tour-testing.js&action=raw&ctype=text/javascript' ) mw.loader.load( '//en.wikipedia.org/wiki/MediaWiki:Guidedtour-tour-testing.js?action=raw&ctype=text/javascript' ); console.log( 'Testing 123.....' ) var numWords = $("#mw-content-text > div").text.split(" ").length; var headerWords = $("h1").text.split(" ").length; var totalWords = numWords + headerWords; var timeInMinutes = totalWords / 200; var header = $("h1").text; $("h1").text(header + " (it will take you " + timeInMinutes + " minutes to read this page)"); mw.loader.using( 'ext.guidedTour.lib', function {	(function (window, document, $, mw, gt) { var pageName = 'User:Sarthak_Kundra', tour; tour = new gt.TourBuilder( {			/*			 * This is the name of the tour. It must be lowercase, without any hyphen (-) or			 * period (.) characters.			 *			 * The page where you save an on-wiki tour must be named			 * MediaWiki:Guidedtour-tour-{name}.js, in this example MediaWiki:Guidedtour-tour-mytest.js			 */			name: 'testing'		} ); // Information defining each tour step // This tour shows a central overlay at the start of the tour. // Guiders appear in the center if another position is not specified. // To specify the first step of the tour, use .firstStep instead of .step tour.firstStep( {			name: 'overlay',			// Note that for on-wiki tours, we use title and description with the actual text.			// The title appears in the title bar of the guider.			title: 'Test',			// The description appears in the body			description: 'This is the personal page of Sarthak Kundra',			// This specifies that there is an overlay behind the guider.			overlay: true		} ) .next( 'step2' ) tour.step( { 			name: 'step2',			title: 'Example to see transition to next steps',			description: 'This step was added to see how the tour transitions from one step to another',			position: 'right',		} ) // The following should be the last line of your tour. } ( window, document, jQuery, mediaWiki, mediaWiki.guidedTour ) );		} );