Tilted Forum Project Discussion Community  

Go Back   Tilted Forum Project Discussion Community > Interests > Tilted Technology

LinkBack Thread Tools
Old 11-25-2004, 10:57 AM   #1 (permalink)
High Honorary Junkie
Location: Tri-state.
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?
macmanmike6100 is offline  
Old 11-25-2004, 12:11 PM   #2 (permalink)
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) {
// 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.

Last edited by scott_p_1; 11-25-2004 at 12:12 PM.. Reason: spelling mistake :P
scott_p_1 is offline  
Old 11-25-2004, 12:14 PM   #3 (permalink)
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.
scott_p_1 is offline  
Old 11-25-2004, 05:00 PM   #4 (permalink)
beauty in the breakdown
Location: Chapel Hill, NC
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.
"Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws."
sailor is offline  
Old 11-25-2004, 09:06 PM   #5 (permalink)
Location: here and there


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.
# chmod 111 /bin/Laden
theFez is offline  
Old 11-28-2004, 01:05 AM   #6 (permalink)
High Honorary Junkie
Location: Tri-state.
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 ;-)
macmanmike6100 is offline  
Old 12-17-2004, 11:32 AM   #7 (permalink)
you could always use ctrl-printscreen and then paste in paint and crop the image
Jakes is offline  
Old 12-17-2004, 11:33 AM   #8 (permalink)
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.
Jakes is offline  
Old 12-20-2004, 09:38 PM   #9 (permalink)
Location: here and there
the point wasnt so much grabbing the image but figuring out what they did to protect it.
# chmod 111 /bin/Laden
theFez is offline  
Old 12-21-2004, 08:59 PM   #10 (permalink)
Location: Boston
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.
franzelneekburm is offline  
Old 01-08-2005, 02:15 PM   #11 (permalink)
CBlend's Avatar
Location: Classified
Amazon sure seems to know what they are doing. Thanks for showing the code here.
CBlend is offline  
Old 02-06-2005, 09:03 AM   #12 (permalink)
Location: M[ass]achusetts
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...

In the end we are but wisps
ManWithAPlan is offline  

amazonhow, clever

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

All times are GMT -8. The time now is 08:43 PM.

Tilted Forum Project

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, 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 63 64 65 66 67 68 69 70 71 72 73