User:Xenwolf/vector.js: Difference between revisions

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

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}");
  }
});