Tilted Forum Project Discussion Community

Tilted Forum Project Discussion Community (https://thetfp.com/tfp/)
-   Tilted Technology (https://thetfp.com/tfp/tilted-technology/)
-   -   Clever Amazon...how do they do it? (https://thetfp.com/tfp/tilted-technology/77046-clever-amazon-how-do-they-do.html)

macmanmike6100 11-25-2004 10:57 AM

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?

scott_p_1 11-25-2004 12:11 PM

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.

scott_p_1 11-25-2004 12:14 PM

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.

sailor 11-25-2004 05:00 PM

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.

theFez 11-25-2004 09:06 PM

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.

macmanmike6100 11-28-2004 01:05 AM

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 ;-)

Jakes 12-17-2004 11:32 AM

you could always use ctrl-printscreen and then paste in paint and crop the image

Jakes 12-17-2004 11:33 AM

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.

theFez 12-20-2004 09:38 PM

the point wasnt so much grabbing the image but figuring out what they did to protect it.

franzelneekburm 12-21-2004 08:59 PM

Quote:

Originally Posted by scott_p_1
you might be able to do it with disabling javascript (it might screw up some other stuff there though, not sure, didn't check).

In FireFox you can specifically disallow the overriding of context menus (and a few other things) without disabling javascript: Tools -> Options -> Web Features -> Advanced. Probably a good option to leave on in any case, I can't really think of a good reason for a web site to intercept right mouse clicks to begin with.

CBlend 01-08-2005 02:15 PM

Amazon sure seems to know what they are doing. Thanks for showing the code here.

ManWithAPlan 02-06-2005 09:03 AM

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 07:34 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62