Template:CharCount: Difference between revisions

Safer nicotine wiki Tobacco Harm Reduction
Jump to navigation Jump to search
(ref script)
(Template try 2)
Line 1: Line 1:
$(function () {
$(function () {
<div id="tpl-CharCount">...</div>
$('#mw-mywiki-example').html('<!DOCTYPE HTML>
myPlace.innerHTML = '<!DOCTYPE HTML>
<head>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
Line 112: Line 111:


</body>
</body>
</html>';
</html>');
}());
}());

Revision as of 11:51, 8 December 2023

$(function () { $('#mw-mywiki-example').html('<!DOCTYPE HTML> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Char Count</title> <style> body { font-family: sans-serif; } </style> <script src='CharCount.js'></script> </head> <body onload='setup()'>

Character Count

This form is useful for planning text and links for a text input area that has a character limit. <form id='textForm' oninput='updateOutput()'>

Maximum Characters Allowed: <select id="chars" name='chars' size="1"> </select>


Abbreviates Links? <input type='checkbox' id='linkAbbreviate' value='Short Links'>

Characters/Link: <select id="linkChars" size="1"> </select>

<textarea id='text' rows=10 cols=80> </textarea>

<output id="outputCount" value='0 of ?'>0 of ?</output>

</form>

Notes

Platform User Type Char Limit Link Chars Use these options
𝕏 (Twitter) CN Unverified 280 -

<a href='?c=280'>Setup</a>

𝕏 (Twitter) CN Verified 580? -

<a href='?c=580'>Setup</a>

𝕏 (Twitter) Unverified 280 13

<a href='?c=280&l=13'>Setup</a>

𝕏 (Twitter) Verified 580 13

<a href='?c=580&l=13'>Setup</a>

</body> </html>'); }());