User:Xenwolf/vector.js: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
Xenwolf (talk | contribs)
created garbage on pages wihth more than one h1 heading
Xenwolf (talk | contribs)
testing...
Line 1: Line 1:
var numWords = $("#mw-content-text > div").text().split(" ").length;
var numWords = $("#mw-content-text > div").text().split(" ").length;
var header = $("#firstHeading").text();
var header = $("#firstHeading").text();
var diffButton = $("#wpDiff");


$("#firstHeading").text(header + " (" + numWords + " words)");
$("#firstHeading").text(header + " (" + numWords + " words) "+((typeof diffButton !== 'undefined')? "*" : ""));

Revision as of 16:10, 29 May 2020

var numWords = $("#mw-content-text > div").text().split(" ").length;
var header = $("#firstHeading").text();
var diffButton = $("#wpDiff");

$("#firstHeading").text(header + " (" + numWords + " words) "+((typeof diffButton !== 'undefined')? "*" : ""));