User:Xenwolf/vector.js: Difference between revisions
Jump to navigation
Jump to search
testing... |
m testing... |
||
| Line 1: | Line 1: | ||
var format_words = function(title, numWords){ | var format_words = function(title, numWords){ | ||
var text = title+" ("+numWords+" words)"; | |||
return text; | return text; | ||
} | } | ||
Revision as of 14:27, 30 May 2020
var format_words = function(title, numWords){
var 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));
});