User:MateyY/Dash.js

/* Dash.js * Replace "\-\-" with "—" on all text areas and text inputs * By MateyY * Version: 1.0 * Support for: ** Skins: all ** Browsers: IE (8+), Firefox, Chrome, Safari, Opera * JavaScript libraries used: jQuery * Please import code; do not copy and paste * Thank you! */ $(function {    $("textarea").keydown(function { for (var i = 0; i < htmlDocument.length; i++) { if (!document.getElementsByTagName("textarea")[i].value) break; document.querySelectorAll('textarea, input[type="text"], input[type="search"]')[i].value = document.querySelectorAll('input[type="text"]')[i].value.replace(/\-\-/g,"—"); }    }); });