Archived Comments (locked)
|
|
The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008) |
|
|
This is a tricky script used everywhere from dynamicdrive. I've tried Anti-Disabler, then manually setting the clickIE4 and clickNS4 functions to null, but it doesn't work. From what I understand, I should be able to craft a simple script like this to null out those functions:
Anyone?
<!--
//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com
var message="Please don't copy the photos, Ask the owner for your own copy!";
///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}
document.oncontextmenu=new Function("alert(message);return false")
// -->
Thanks in advance... |
|
|
I replaced the contents of the script with:
if (document.attributes != null) {
all = document.getElementsByTagName("*");
|
|
|
This is the only extension on which I get an error in the javascript console. It points to line 52 document.onmousedown = null; Why is that? |
|
|
oh sorry i forgot the link below by Arvid which works. sorry i formatted my pc and reinstalled everything so didnt notice Arvid's link. |
|
|
hey Arvid its not working again on IMDB pages.
regards
|
|
|
Thanks Arvid. Your update makes it work on imdb. Another annoyance thwarted! |
|
|
hey Arvid thanks for the update man. keep updating this script. without this it would be very hard to blog/stumble so far it works on almost every no-right-click webpages |
|
|
Oh yeah, code in comments is not a good idea around here :/ Try this: |
|
|
Indeed, it does not work in imdb galleries. try this instead: var e, i, all; try {
all = document.getElementsByTagName("*");
|
|
|
This script doesn't do anything to restore the right-click menus on the images in photo galleries on imdb.com. Any ideas? |
|
|
Messes up flickr interface, so you'll have to add http://www.flickr.com/* to the exclusion list. |