User:Marco/common.js: Difference between revisions

From IIFQ
(Created page with "window.alert("animatedMap gadget loaded"); //mw.loader.using(['animatedMap']).then(function () { //};")
 
No edit summary
Line 1: Line 1:
window.alert("animatedMap gadget loaded");
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)");


//window.alert("animatedMap gadget loaded");
//mw.loader.using(['animatedMap']).then(function () {
//mw.loader.using(['animatedMap']).then(function () {
//};
//};

Revision as of 04:32, 10 January 2024

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)");

//window.alert("animatedMap gadget loaded");
//mw.loader.using(['animatedMap']).then(function () {
//};