User:Xenwolf/vector.js: Difference between revisions

Xenwolf (talk | contribs)
testing
Xenwolf (talk | contribs)
m testing...
Line 1: Line 1:
var numWords = $("#mw-content-text > div").text().split(" ").length;
var numWords = $("#mw-content-text > div").text().split(" ").length;
var headerWords = $("h1").text().split(" ").length;
var headerWords = $("h1").text().split(" ").length;
let totalWords = numWords + headerWords;
let header = $("h1").text();


var totalWords = numWords + headerWords;
$("h1").text(header + " (" + totalWords + " words)");
 
var timeInMinutes = totalWords / 200;
 
var header = $("h1").text();
 
$("h1").text(header + " (it will take you " + timeInMinutes + " minutes to read this page)");