MediaWiki:CharCount.js: Difference between revisions
Richardpruen (talk | contribs) Final version, just .js embedding the html into this didn't work |
Richardpruen (talk | contribs) Forgot the identifier |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
$( function () { | $( function () { | ||
var myPlace = document.getElementById('CharCount'); | |||
function getID(id) { | function getID(id) { | ||
return document.getElementById(id); | return document.getElementById(id); | ||
} | } | ||
function addNumericOptions(id, min, max, defIndex) { | |||
var s = getID(id); | var s = getID(id); | ||
for (ii=min; ii<=max; ii++) { | for (ii=min; ii<=max; ii++) { | ||
Line 14: | Line 14: | ||
} | } | ||
s.value = defIndex; | s.value = defIndex; | ||
} | } | ||
function getMaxChars() { | function getMaxChars() { | ||
var maxChar = getID('chars'); | var maxChar = getID('chars'); | ||
Line 114: | Line 114: | ||
updateOutput(); | updateOutput(); | ||
} | } | ||
} ); | |||
}); |