Author Topic: right click disabler again  (Read 4690 times)

0 Members and 1 Guest are viewing this topic.

Offline fabio

  • Newbie
  • *
  • Posts: 36
    • View Profile
right click disabler again
« on: August 26, 2006, 07:21:43 PM »
i know that this has been discussed before , i`ve read every single post and tried everything but i can`t get it to work with ie and ff at the same time!

for example i changed header.html as instructed here http://www.4homepages.de/forum/index.php?topic=11241.0
now right click is disabled in ff but not in ie. stil anyone can save the image not only from the menu but also from the top right menu with the 4 icons (i don`t know how it`s called :D )

ps you can see this http://photos.iraklis.eu/img49.htm

Offline honda2000

  • 4images Guru
  • *******
  • Posts: 3.263
    • View Profile
    • Wir machen Internet!
Re: right click disabler again
« Reply #1 on: August 26, 2006, 07:37:17 PM »
diable in your header this script:

Code: [Select]
script language=JavaScript>
<!--

//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 Register To Download Images!";

///////////////////////////////////
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")

// -->
</script>

Offline faux

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: right click disabler again
« Reply #2 on: August 28, 2006, 12:28:30 AM »
It's almost ineffective to protect your images by doing this with this little JS. There are hundreds of possibilities to save the images although:
  • Disable JS
  • Disable the "Disable or replace Contextmenu"-Checkbox in FFs Security Settings
  • Viewing the HTML-Source and looking for the image-path
  • Using the "Media"-Tab in FFs "Page-Info" menu (in Tools-Menu)
  • Looking into the browsercache
  • Making screenshots
  • Downloading the whole page by using the File --> Save function of your browser
  • Pressing the left mousebutton, then press the right button at the same time and release the left button and then the right button
  • In IE you can use the image toolbar (the toolbar which appears when you place your mouse-cursor on a picture for a short time)
  • ...

You see, there is NO posibillity to save your images from beeing downloaded. ;)

Regards,
Faux

jojomart

  • Guest
Re: right click disabler again
« Reply #3 on: December 21, 2007, 06:01:35 PM »
It's almost ineffective to protect your images by doing this with this little JS. There are hundreds of possibilities to save the images although:
  • Disable JS
  • Disable the "Disable or replace Contextmenu"-Checkbox in FFs Security Settings
  • Viewing the HTML-Source and looking for the image-path
  • Using the "Media"-Tab in FFs "Page-Info" menu (in Tools-Menu)
  • Looking into the browsercache
  • Making screenshots
  • Downloading the whole page by using the File --> Save function of your browser
  • Pressing the left mousebutton, then press the right button at the same time and release the left button and then the right button
  • In IE you can use the image toolbar (the toolbar which appears when you place your mouse-cursor on a picture for a short time)
  • ...

You see, there is NO posibillity to save your images from beeing downloaded. ;)

Regards,
Faux

However, not every person knows how to do this - I found this script on a website - you place it right before the </body> in your footer.html file

Code: [Select]
<script type="text/javascript">

/*
Disable right click script II (on images)- By Dynamicdrive.com
For full source, Terms of service, and 100s DTHML scripts
Visit http://www.dynamicdrive.com
Modified here to disable IE image hover menu and
truly disable right click in FF by jscheuer1 in
http://www.dynamicdrive.com/forums
*/

var clickmessage="Right click disabled on images!"

function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage);
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
else if (document.getElementById)
if (e.which==3&&e.target.tagName=="IMG")
setTimeout("alert(clickmessage)",0)
}

function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}

if (document.all){
document.onmousedown=disableclick
for (var i_tem = 0; i_tem < document.images.length; i_tem++)
document.images[i_tem].galleryimg='no'
}
else if (document.getElementById)
document.onmouseup=disableclick
else if (document.layers)
associateimages()
</script>

It might not get everyone, but it will stop most people.  AND it works with FireFox and IE

Joanne