Sesetengah orang mungkin agak tidak senang bagi sesiapa mengambil hasil entri dalam blog mereka. Antara cara yang digunakan untuk mengelakkan entri atau kandungan dalam blog di'ambil' adalah dengan disable right click atau disable highlight.
Tutorial untuk disable right click sudah pun ada sebelum ini, dan kali ini tutorial adalah untuk disable highlight text dalam blog.
Ikuti tutorial mudah seperti di bawah.
1. Dari dashboard > design > add a gadget > HTML/javascript
2. Masukkan kod di bawah dalam ruangan HTML/javascript
<script type="text/javascript">
function disableSelection(target){
if (typeof target.onselectstart!="undefined") //IE route
target.onselectstart=function(){return false}
else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
target.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 dan lihat hasilnya..:)
TIPS:
Untuk kesan yang lebih baik, letakkan/drag HTML atas ruangan blog post. Ini akan membuatkan kod disable highlight ini 'dibaca' dahulu sebelum entri.:)
Suka tutorial ini.?
53 comments:
tq..dh jd pon..hehe
Dah letak walaupun tak berapa faham konsep.. huhuhu...
kak . blog ira pnye title post ilang lha . cane na dpatkan alek ? :(
help mee ! hoho
*hope tak mnyusahkan =.='
opss sowie . skaty jeah kak . tak ksah a ea . hoho =.='
dah letak, jadi apa?? biase jek heheheheh
tak muncul pun...:(
tade pape pon . huhu
Dh jDi. . tHanX so MuCH. .
tuan pnye blog, trime kasih sgt2 sbb byk sgt tutoriAL kt sini.. sy dpt belajar mcm2, tp bleh tak sy nk request satu tuto?
bleh tnjuk kn tuto cara utk tukar header blog ? :) bleh yea?
thanks for this tutorial! it works and yeayyy :)
hi..!!saye sesat mse nk letak clock kat blog sye...clock yg appear kat blog sye huduh sgt....cari dekat sini, xjumpe plak....boleh tulung ajar x???~time kaseh
wah bagus juga bang tipsnya,lagi belajar nih caranya langsung ke Tkp.,.,,..,!!
haha..dh buat dn dh berjaye..thx3x!! :)
lor takleh la buat note cepat klu camni.. hehehe
owhh.. aku paham.. org nak copy tajuk entri post kita tak boleh.. aku try highlight tajuk post, x boleh copy lgsg.. mmg x jd pape, cube korang copy tajuk entri balik.. aku pun tak boleh.. hehe
tq bro.. tips berguna..
:) http://hazissac.blogspot.com/
wahh..nak try gak
klau image lak ??
TOLONG :(
nak tnya blh x ?
mcm mana nak buat anak panah kite cantik lagi ..
gambar kartun.. tolong yer..
sal ble ltak je mende ni...cursor sye xde...??
kesemua steps tersebut boleh dilepasi dengan hanya menggunakan tutorial nie...http://eddytech03.blogspot.com/2010/12/tak-boleh-right-click-laa-kat-page.html
mmg elok javascript..tp kalau terlalu byk..its annoying. dan if possible..klu ada benda yang penting2 untuk dishare...kan dah susah dah
thank u so much .. dah dpt :)
tq...fiza dah buat...dah jadi pun...cuma nak wat button like je x dapat2 lagi...eerrmm....
pehh~~tq r banyk2 admin ni... bergune betul... singgah blog cerita kelakar saya ok..:p http://lawakbodoh4u.blogspot.com/
Thank youuuu :)
Dah lama cari code ni :D
wah3.. menarik... suke3.. :)
klau disable highlight utk pic xder ker?? :)
thanks fr sharing the tips! luv it ;)
yeh!! berjaya! thank you thank you!
nice info here~
bagi sape2 yg xnk pic nye kne curi,mse post pic tu buang p'kataan herf yg kt dpn tu
thx for this tuto,,,tp np ble wt mnde ni,cursor sy jdi mcm biase blek yep???
knpa x boleh?
nice tutorial here..thanks..
dah jadik...tq so much!..
Thanks yaa , (:
thanx!!
tq . berguna .
tq
salam..nk tnya..mcmna kta nk hide kan ikon 2k EDIT kat stp gadget yg kta dah wat..
ok.. thankyouu..
tq,,,,hehe,,,seronok pulak rase.haha
comel gak ek..huhuhu..
kasih...
jangan ego dan sombong bila orang tunjukkan peluang..dah buang ego tu??? daftar sekarang disini http://SLIMBERRYEXTREMEBIZ.TK
tenkiu..dah berjaya buat..
saya copy ye
using thiss tuto ! ^^ thax ~
kalau guna mozilla
click 1st jadi, but klu click utk 2nd time akan keluar "prevent this page from creating additional dialogs"
if sape2 yg view blog kite click
box tu, dah boleh copy entry dlm blog.
so camne nk settle benda ni?
da bole..thanx so much...mcm mne plak ngan gambar?
nmpak cm kejam jer..de x code y just say assalamualaikum ker or just nk ckp y comey2 de x??
thanks..da jd.tpy pix uwhh tk jd2..pelik tul...????padahal simple je arahan dia :(
time kasih banyak2 :)
dill.
thanks u so much my sister....
Thanks buat tutorialnya nya sob! :)
topspot-official.blogspot.com
dalam tutorial ni, kita just disable highlight kan? tapi camne nak disable middle click sekali. (macam contoh kalau kita klik kat gambar first tu.)
Post a Comment