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


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 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360