PDA

View Full Version : disabling right click :)



Anexxion
03-02-2008, 09:06 PM
lets hope this helps some people:


<!--
var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
// -->

if you replace false with true, right click is enabled, if you put it false, right click disabled.

ofcourse there is ALWAYS a way to get around it (via view>source) but it will stop some people :D

Nile
03-02-2008, 09:13 PM
Or:
tools->options->content-> unclick 'enable javascript'...

Anexxion
03-02-2008, 09:24 PM
yeah but most 13 year old wannabe coders wont do that, either way it still helps

djr33
03-03-2008, 04:38 AM
Or annoys people.

tech_support
03-03-2008, 04:51 AM
That's a cheap ripoff out of the DD script. (http://www.dynamicdrive.com/dynamicindex9/noright3.htm)

Twey
03-03-2008, 05:58 AM
Hahahahaha. On DD's own forums xD

jscheuer1
03-03-2008, 02:57 PM
That's a cheap ripoff out of the DD script. (http://www.dynamicdrive.com/dynamicindex9/noright3.htm)

Which itself is a not so cheap, quasi rip off, in that it does no real good other than to get folks interested in scripting.

Anexxion
03-03-2008, 10:10 PM
yeah i didnt get it from DD, i got it from another site

www.fkn0wned.com, their index page, i thought it was interesting to make it non right clickable so i posted part of the source here, maybe the user who created that page used this script?

djr33
03-03-2008, 10:26 PM
A cease and desist notice awaits in that site's future :)

Dal
07-22-2008, 02:57 AM
Which itself is a not so cheap, quasi rip off, in that it does no real good other than to get folks interested in scripting.

Let me add to this for those who may not know what "Quasi" mean (Like me :D :p)

# quasi(a): having some resemblance; "a quasi success"; "a quasi contract"
wordnet.princeton.edu/perl/webwn

# Quasi is indie rock band formed in Portland, Oregon in 1993, consisting of the ex-husband and wife team of Sam Coomes (vocals, guitar, roxichord, various keyboards) and Janet Weiss vocals and drums. ...
en.wikipedia.org/wiki/Quasi

# resembling or having a likeness to something
en.wiktionary.org/wiki/quasi

The above is a quasi to googles define:keyword feature but its not from there, I swear, whos google never heard of them, you aint seen me, right, where am I. Im not putting up with all of these accusations GOODBYE!

:eek: :D
Dal

jscheuer1
07-22-2008, 09:20 AM
I did not mean the rock band. ;)

Dal
07-23-2008, 01:01 AM
lol :D

Yeah sorry not like the rock band at all :)

I once read a good quote about Google
"Google is so good at finding you what you want that if you typed in "Sex with goats on fire" Google would further try to define what your looking for my replying "Please specify type of goat""

I also read that if you took off all of the **** on the internet there would be one website remaining "bring back the **** .com" (borken incase anyone actually clicked the link! :o )

Ps the thread was about disabling the right click menu. Im sure this is probably the most asked question on javascript but you would have a better chance of successfully scripting a function that made toast! I believe right click is disabled by default on Mac systems as they only have 1 mouse button :p (dont quote me on that, its been a while since I seen one and the thing kept talking to me when ever I plugged something in...) :eek: