t u t o r i a l s i t e
home tutorial twitter facebook official +follow
disclamiar
annyeong guise
Yad {16} Malaysian. This my tuto site. Contact me, I'm friendly.

chat
leave footsteps

credit
thanks for everything
©nurin
thank you people

« newer post
older post »
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>

3- Save and you're done.


Classic Template

1 - Search your body code.
*code template anda mungkin berbeza
body {

2 - Copy code dibawah;
-moz-user-select: none;
-webkit-user-select: none;
-webkit-user-drag: none;

3 - Paste selepas code body {

4 - Done.

Goodluck!

Labels: