disclamiar annyeong guise
chat leave footsteps
credit thanks for everything
thank you people |
Tutorial: Disable Highlight Friday, June 10, 2011 - 0 comment Asalamualaikum.
Basically, ramai yang tak suka apabila hasil kerjanya di curi. Siapa je suka? Kita penat menulis, mereka yang tidak bertanggungjawab sewenang-wenang mengcuri hasil kerja kita tanpa credits. Jadi tutorial ini akan menghentikan perbuatan si peng-copycat, copydog atau segala copyanimals untuk terus mencuri.
Lets start. Normal Template 1 - Dashboard > Design > AddGadget > HTMLjavascript 2 - Paste semua code dibawah <script type="text/javascript">function disableSelection(target){if (typeof target.onselectstart!="undefined") //IE routetarget.onselectstart=function(){return false}else if (typeof target.style.MozUserSelect!="undefined") //Firefox routetarget.style.MozUserSelect="none"else //All other route (ie: Opera)target.onmousedown=function(){return false}target.style.cursor = "default"}//Sample usages//disableSelection(document.body) //Disable text selection on entire body//disableSelection(document.getElementById("mydiv")) //Disable text selection on element with id="mydiv"</script><script type="text/javascript">disableSelection(document.body) //disable text selection on entire body of page</script> Classic Template 1 - Search your body code. *code template anda mungkin berbeza body { 2 - Copy code dibawah; -moz-user-select: none; 3 - Paste selepas code body { 4 - Done. Goodluck! Labels: Tutorial |