You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 16, 2021. It is now read-only.
let update_line_numbers=function(a,b){let c=a.value.split("\n").length,d=b.children.length,f=c-d;if(0<f){let g=document.createDocumentFragment();for(;0<f;){let h=document.createElement("span");h.className="tln-line",g.appendChild(h),f--}b.appendChild(g)}else if(0>f)for(;0>f;)b.removeChild(b.firstChild),f++},append_line_numbers=function(a){let w=console.warn,b=document.getElementById(a);if(null==b)return w("[tln.js] Couldn't find textarea of id '"+a+"'");if(-1!=b.className.indexOf("tln-active"))return w("[tln.js] textarea of id '"+a+"' is already numbered");b.classList.add("tln-active"),b.style={};let c=document.createElement("div");b.parentNode.insertBefore(c,b),c.className="tln-wrapper",update_line_numbers(b,c),b.onpropertychange=b.oninput=b.onkeydown=b.onkeyup=function(d,f){return function(g){(36==g.keyCode||36==g.which||"Home"==g.code||"Home"==g.key||13==g.keyCode||13==g.which||"Enter"==g.code||"NumpadEnter"==g.code||"Enter"==g.key)&&(d.scrollLeft=0),update_line_numbers(d,f)}}(b,c),b.onchange=b.onmousewheel=b.onscroll=function(d,f){return function(){f.scrollTop=d.scrollTop}}(b,c)};