User:Xenwolf/vector.js: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
Xenwolf (talk | contribs)
m testing...
Xenwolf (talk | contribs)
reduced
 
(31 intermediate revisions by the same user not shown)
Line 1: Line 1:
var numWords = $("#mw-content-text > div").text().split(" ").length;
$(document).ready(function(){
var headerWords = $("h1").text().split(" ").length;
  const isEditing = $("div.editButtons").length !== 0;
let totalWords = numWords + headerWords;
  if (isEditing) {
let header = $("h1").text();
    $("#firstHeading").append(" \u{1F642} \u{1F609} | \u{1F641}");
 
    $("#toolbar").append("\u{1F642}");
$("h1").text(header + " (" + totalWords + " words)");
  }
});

Latest revision as of 17:03, 12 June 2020

$(document).ready(function(){
  const isEditing = $("div.editButtons").length !== 0;
  if (isEditing) {
    $("#firstHeading").append(" \u{1F642} \u{1F609} | \u{1F641}");
    $("#toolbar").append("\u{1F642}");
  }
});