User:Xenwolf/vector.js: Difference between revisions
Jump to navigation
Jump to search
m ... testing done. |
m testing... |
||
| Line 1: | Line 1: | ||
function format_words(title, numWords){ | |||
let text = title+" ("+numWords+" words)"; | |||
return text; | |||
} | |||
$(document).ready(function(){ | $(document).ready(function(){ | ||
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(); | ||
$("#firstHeading").text(header | $("#firstHeading").text(format_words(header, numWords)); | ||
}); | }); | ||