User:Xenwolf/vector.js: Difference between revisions
Jump to navigation
Jump to search
m testing... |
testing... |
||
| Line 1: | Line 1: | ||
function | var format_words = function(title, numWords){ | ||
let text = title+" ("+numWords+" words)"; | let text = title+" ("+numWords+" words)"; | ||
return text; | return text; | ||
Revision as of 14:26, 30 May 2020
var format_words = function(title, numWords){
let text = title+" ("+numWords+" words)";
return text;
}
$(document).ready(function(){
var numWords = $("#mw-content-text > div").text().split(" ").length;
var header = $("#firstHeading").text();
$("#firstHeading").text(format_words(header, numWords));
});