User:Xenwolf/vector.js: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
Xenwolf (talk | contribs)
m testing...
Xenwolf (talk | contribs)
m ... testing done
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;
var totalWords = numWords + headerWords;
var header = $("h1").text();
var header = $("h1").text();


$("h1").text(header + " (" + totalWords + " words)");
$("h1").text(header + " (" + totalWords + " words)");

Revision as of 10:46, 28 May 2020

var numWords = $("#mw-content-text > div").text().split(" ").length;
var headerWords = $("h1").text().split(" ").length;
var totalWords = numWords + headerWords;
var header = $("h1").text();

$("h1").text(header + " (" + totalWords + " words)");