Différences entre les versions de « MediaWiki:Mobile.js »

14 octets ajoutés ,  13 septembre 2022 à 13:21
aucun résumé de modification
Ligne 5 : Ligne 5 :
var a = $("#bodyContent").text();
var a = $("#bodyContent").text();
var wCount = a.split(" ").length;
var wCount = a.split(" ").length;
var timeInMinutes = Math.floor(wCount / 200 + 1);
var timeInMinutes = Math.round(Math.floor(wCount / 200) + 0.5);
var $wordOutput = $( "<p>" + timeInMinutes + " min de lecture" + "</p>").css("font-size", "normal");
var $wordOutput = $( "<p>" + timeInMinutes + " min de lecture" + "</p>").css("font-size", "normal");
$( "#bodyContent" ).prepend($wordOutput);
$( "#bodyContent" ).prepend($wordOutput);
5 465

modifications