Disabling Right Click (again)

redcrownredcrown Registered Users Posts: 60 Big grins
edited October 20, 2006 in SmugMug Support
Chasing another subject I came across this page:

http://www.theallineed.com/webmasters/04092203.htm

And noticed that I can't right click anywhere on that page.
Unless I turn Javascript off, then I can right click anywhere.

So it must be javascript code. Would appreciate any scripter experts to look at the source for that page and (1) see how it works; (2) tell if it would work on SmugMug for us poor Power users.

Obvoiusly easy to defeat by truning scripting off, but still better than nothing.

Comments

  • dogwooddogwood Registered Users Posts: 2,572 Major grins
    edited September 21, 2006
    screen captures
    Easier to defeat than turning the scripting off is a screen capture. Takes about a second or two to grab anything you can see on your screen. I've yet to see something that turns that off-- my point being if you're concerned about your images, watermark them, don't allow originals or only post small resolution, etc, etc. The right click feature does fool some, but it's a pretty easy work around for most.

    Also, I've found with digital downloads for sale, it's much the same as itunes discovered. Most people (emphasis on most) won't swipe music or photos if you provide an easy and affordable way for them to purchase the music or photos instead.

    Anyway, I know that's not really the point of your post, but I think it's important no one put too much faith in right-click or ctrl-click protection.

    Portland, Oregon Photographer Pete Springer
    website blog instagram facebook g+

  • sirsloopsirsloop Registered Users Posts: 866 Major grins
    edited September 21, 2006
    How To: Disable "Print Screen"
    http://dgrin.com/showthread.php?t=42515


    The idea is to make it difficult for as many people as possible. This includes right click block, print screen blocking, print blocking, and watermarking. Anyone using IE is going to have a hell of a time getting a photo off my site... if they use firefox or some other obscure browser thats not effected by the code, then they still have a "large" small sized photo with my massive watermark across it.
  • mcgilmcgil Registered Users Posts: 110 Major grins
    edited September 21, 2006
    sirsloop wrote:
    if they use firefox or some other obscure browser

    FF obscure !???!t!?!?!? :)
  • sirsloopsirsloop Registered Users Posts: 866 Major grins
    edited September 21, 2006
    no, FF is not obscure, but some other browsers are...

    ...I would have said "IE or obscure browers LIKE FF"...

    I use FF every day!
  • dogwooddogwood Registered Users Posts: 2,572 Major grins
    edited September 21, 2006
    hell of a time?
    Took me a second and another three or four seconds in PSCS to re-size it smaller. Not much trouble at all-- and I don't see the watermarks you're talking about. Don't fool yourself-- there's no such thing as print screen protection (yes, I'm on a PC)

    67284329.jpg

    Portland, Oregon Photographer Pete Springer
    website blog instagram facebook g+

  • jwashburnjwashburn Registered Users Posts: 476 Major grins
    edited October 18, 2006
    dogwood wrote:
    Took me a second and another three or four seconds in PSCS to re-size it smaller. Not much trouble at all-- and I don't see the watermarks you're talking about. Don't fool yourself-- there's no such thing as print screen protection (yes, I'm on a PC)

    67284329.jpg

    Actually you can prevent print screen from working using something like this
    function clearImage()
    {
        r = window.clipboardData.clearData("Image")
    }
    
    ci = setInterval("clearImage()", 10)
    

    You can read more about it here

    http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/objects/clipboarddata.asp?frame=true

    However it will wipe out the entire clipboard, which could be considered destructive.
  • ivarivar Registered Users Posts: 8,395 Major grins
    edited October 18, 2006
    All the disabling screengrabs, and disabling rightclicking are very nice, but also very easy to bypass. Select JavaScript off in your browser, and none of them will work anymore. Granted it might stop a few people from getting your photos, but if people want it, they will get it. I'd reccomend watermarking just to be sure, combined with S and M sized photos only if you want to be alot more certain about people not getting your photos. And even then....
  • jwashburnjwashburn Registered Users Posts: 476 Major grins
    edited October 18, 2006
    Agreed 100%. I am just trying to do a little more. Many of the teenagers that visit my site are very smart and know all the workarounds, so I am trying to just add more protection. I already watermark and use only small and mediums.

    I have tested this small script out as well and it works on a regular html page. I cant get it to work with smugmug just yet
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd[/URL]">
    <html xmlns="[URL="http://www.w3.org/1999/xhtml"]http://www.w3.org/1999/xhtml[/URL]">
    <head>
    ****** http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    </HEAD>
    <BODY onload=setInterval("window.clipboardData.clearData()",20)>
    sdfdsfdsfdsfd
    <img src="images/test.jpg" />
    </BODY>
     
    
    </html>
    

    Of course on this page I dont have any of the right click disabled etc, however I think if I can get this to work on smug it will go a long way.

    Disable right click helps, but if they turn off java they can right click and save, but smug has that beat with the spacer.gif file.
  • sirsloopsirsloop Registered Users Posts: 866 Major grins
    edited October 18, 2006
    I didnt watermark those particular photos on purpose. :giggle Its no problem grabbing a screener of ANY website. If there is some code blocking it, i'm sure there is a browser out there that it wont work on. That print screen thingy I use only works with IE....
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited October 19, 2006
    <BODY onload=setInterval("window.clipboardData.clearData()",20)>
    

    the reason why you get it to work is because your syntax is incorrect.

    it should be like this...
    <BODY onload="setInterval(\"window.clipboardData.clearData()\",20)">
    

    however, in saying that, it is very easy to disable this code by simply typing..

    javascript:void(window.clearInternal(0))

    into the address bar once the page has loaded.
    David Parry
    SmugMug API Developer
    My Photos
  • jwashburnjwashburn Registered Users Posts: 476 Major grins
    edited October 19, 2006
    devbobo wrote:
    <BODY onload=setInterval("window.clipboardData.clearData()",20)>
    

    the reason why you get it to work is because your syntax is incorrect.

    it should be like this...
    <BODY onload="setInterval(\"window.clipboardData.clearData()\",20)">
    

    however, in saying that, it is very easy to disable this code by simply typing..

    javascript:void(window.clearInternal(0))

    into the address bar once the page has loaded.

    Dammit JIM. Foiled again

    Is it wrong to mix old movie tv quotes in the same sentence?
  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited October 20, 2006
    Why punish all your viewers for a silly protection mechanism
    jwashburn wrote:
    Agreed 100%. I am just trying to do a little more. Many of the teenagers that visit my site are very smart and know all the workarounds, so I am trying to just add more protection. I already watermark and use only small and mediums.

    I have tested this small script out as well and it works on a regular html page. I cant get it to work with smugmug just yet
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd[/URL]">
    <html xmlns="[URL="http://www.w3.org/1999/xhtml"]http://www.w3.org/1999/xhtml[/URL]">
    <head>
    ****** http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    </HEAD>
    <BODY onload=setInterval("window.clipboardData.clearData()",20)>
    sdfdsfdsfdsfd
    <img src="images/test.jpg" />
    </BODY>
     
    
    </html>
    
    Of course on this page I dont have any of the right click disabled etc, however I think if I can get this to work on smug it will go a long way.

    Disable right click helps, but if they turn off java they can right click and save, but smug has that beat with the spacer.gif file.
    This is HORRID stuff to put in your page. You are automatically destroying anything on the user's clipboard anytime they visit your site. This is ANYTHING on the clipboard, no matter what application it belongs to. You are punishing normal users in pursuit of a silly protection mechanism that can be defeated. If I ever find out someone has this on their site, I will never visit their site again. Please don't do it. It's quite unfriendly to all your viewers including ALL the innocent ones.

    Anyone can easily bypass this code by either turn off JavaScript or by simply downloading a free screen capture program that does not use the clipboard.

    If you are really all bent out of shape about your images being stolen, then the ONLY real protection is to watermark them. If you are already watermarking, then why are you so worried about a screen capture? You CANNOT prevent them from being taken otherwise. Why punish your innocent viewers by wrecking their clipboards just because they came to visit you?
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
Sign In or Register to comment.