How to add double click to copy function on your blogegr
Hi companions, Welcome to our blog. These days you may be seen sites utilize double tap to duplicate code capability. You may be contemplating how to add a double tap to duplicate code capability on your Blogger site. So distributed an article for you to tell you the best way to add double tap to duplicate code in Blogger. So without burning through any time we should start.This will assist your guests with duplicating <pre> label contents. They can basically double tap on the Linguistic structure Highlighter to duplicate its items to clipboard, they never again need to choose the codes and duplicate.
Thus we, most importantly, as to give you a data about double tap to duplicate
Note: Before we start adding that function make sure You Have Already Downloaded Your Backup
Find </body> Paste The Below Code Above It.
<!--[ Double click to Copy ]--
script>/*<![CDATA[*/ for(var preclick=document.getElementsByTagName('pre'),i=0;i<preclick.length;i++)preclick[i].addEventListener('dblclick',function(){var e=getSelection(),t=document.createRange();t.selectNodeContents(this),e.removeAllRanges(),e.addRange(t),document.execCommand('copy'),this.classList.add('copied'),setTimeout(()=>{window.getSelection().removeAllRanges(),this.classList.remove('copied')},4e3)},!1); /*]]>*/</script>
Conclusion:-
Now I Hope You Have Successfully Knows That how to add double click to copy function on your Blogger it's easy to do.its easier then copy manually
Comments
Post a Comment