JAVASCRIPT   68

text sizer

Guest on 3rd July 2022 05:39:04 AM

  1. var tgs=new Array("div");var szs=new Array("xx-small","x-small","small","medium","large","x-large","xx-large");var startSz=1;function ts(h,c){if(!document.getElementById){return;}var b=document,e=null,d=startSz,f,g,a;d+=c;if(d<0){d=0;}if(d>6){d=6;}startSz=d;if(!(e=b.getElementById(h))){e=b.getElementsByTagName(h)[0];}e.style.fontSize=szs[d];for(f=0;f<tgs.length;f++){a=e.getElementsByTagName(tgs[f]);for(g=0;g<a.length;g++){a[g].style.fontSize=szs[d];}}}function goToPage(a){if(a!=""){window.location.href=a;}}

Raw Paste


Login or Register to edit or fork this paste. It's free.