![]() |
Clever Amazon...how do they do it?
Hi everyone,
Visit http://www.amazon.com/gp/reader/1582...=1#reader-page Now, you'll notice that an image appears, but there is no link for it in the source. Instead, it's a transparent pixel stretched to cover the area of the image. I'm baffled at how they do that. Indeed, they've even replaced right-clicking on the image with a copyright notice. I can't even print it to a PDF (and don't have a printer...can one print that image at all??) Any hints as to how they do it? |
Pretty snazzy. You can find it out if you view the source though. (be careful, they added a tonne of white space at the top so it looks like you can't view the source either, you gotta scroll down). You'll eventually see this:
<!-- var copyright="Please respect the copyright of this material."; function noRightClick(e) { if (document.layers || document.getElementById && !document.all) { if (e.which == 2 || e.which == 3) { document.captureEvents(Event.MOUSEDOWN); // alert(copyright); return false; } } else if (document.all && !document.getElementById) { if (event.button == 2) { // alert(copyright); return false; } } } function noContextMenu(e) { return false; } function noClip(e) { if(window.clipboardData) { window.clipboardData.setData("Text", ""); } } document.onblur = noClip; document.onmousedown = noRightClick; document.oncontextmenu = noContextMenu; // --> They just used some javascript. |
Oh yeah, if you're looking to get the actual images, you might be able to do it with disabling javascript (it might screw up some other stuff there though, not sure, didn't check). Or just search through the source for the image location and try to get it from there.
|
The right click disabling is a trick used frequently--and one pretty easy to get around. Like someone said, just disable javascript, or go into the source to find the image. The single pixel image stretch to cover it is pretty clever though, but theres probably a way around it if you look hard enough into the code. Its gotta show it up on your screen, and if it can do that, theres certainly a way to get it off onto your hard drive--but by so much obfuscation, theyve made it too difficult to rip off a serious portions of a book, which is what they were trying to prevent in the first place.
|
http://lookinside2-images.amazon.com...WHfzwLK5VbgPXJ
link Very sneaky. they use css to set an image as the background for a table cell and call it without an image extension. I usually advise people not to bother with trying to stop downloading images, just water mark anything you dont want stolen. Its funny, with firefox you cant disable right clicking if people dont want you to. You can with ie, but with ie, if you hover over the image it puts up a little toolbar to let you download it. thats about as good a job as i have seen though. |
wow, you guys all ROCK! thanks very much.
i was impressed with amazon for that sneakiness, and even more impressed that you guys were able to figure it out so quickly. i spent 20 minutes easy trying to figure that one out on my own (but, after seeing theFez's solution, realize I was looking in all the wrong places ;-) |
you could always use ctrl-printscreen and then paste in paint and crop the image
|
with an image that size you would have to ctrl-printscreen the image multiple times to make sure you had it all then realight all the pieces.
|
the point wasnt so much grabbing the image but figuring out what they did to protect it.
|
Quote:
|
Amazon sure seems to know what they are doing. Thanks for showing the code here.
|
i use proxomitron, it's a software proxy, lets you filter out whatever you want, you can do some really nice stuff with it if you know how to use regex efficiently. they have a bunch of anti-no-right-click scripts that you can find...
http://proxomitron.info |
All times are GMT -8. The time now is 09:09 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project