This JavaScript alert box is admissible in court

Most people have seen stupid "copy protection" on Web pages, where some message about copyright or something pops up when you click the right mouse button. This is supposed to stop you from wickedly making another copy of some portion of the data that has already been stored on your own hard drive when your Web browser asked the server for the page, and the server cheerfully sent it.

(See also, people who make Web sites and then demand that you not link to them.)

Via The Daily WTF's most recent instalment of Error'd, though, comes what may be the Greatest BS Right-Click Warning Ever:

Ridiculous right-click warning

Every listing from this seller has this. Just scroll down to the main product description and click your wicked pirate terrorist right mouse button somewhere on it, and you will immediately receive your very own copy of this fascinating alert box.

Right-click over and over! Send dozens of "reports"! Wheeee!

In case you're new to all this, and wondering: No, nothing's actually being "recorded" or "reported". The alert is created by a little snippet of JavaScript that tells the browser to do something when you release the second mouse button. In this case, the code pops up the alert with the stupid message.

It works in the same way as this, which also pops up an alert when you click on it. (It's also not unlike the system used for "security" by the subjects of another Daily WTF story.)

Unless you've got JavaScript disabled, that is, in which case it won't do anything at all.

If you throw caution to the wind and view the source of any of this eBay seller's item pages - using that advanced hacker tool, your browser's "View" menu, or perhaps just by right-clicking somewhere else on the page from the main product description - you'll see that the high-powered enterprise-computing code that creates this very serious warning is part of a rather long single line.

As entertained DailyWTF commenters have observed, that line is, in the case of the listing I looked at anyway, a magnificent 40,076 characters in length.

Some text editors will choke on lines longer than 32,768 characters, you know.

So that's even more security, right there!

8 Responses to “This JavaScript alert box is admissible in court”

  1. Chazzozz Says:

    Darn...Opera seems to be immune to this kind of idiot BS stupidity 'copy protection'. GASP! Maybe that means Opera is a hacker tool!

  2. acidk Says:

    Opera isn't immune so much as its default behavior is to not "allow scripts to detect context menu events". Enable that under right click>edit site preferences>Scripting. In short javascript based stuff can't detect right clicks under default settings.

    I found this out while trying to get webui of utorrent to work a while back.

  3. Joseph Says:

    I don't know if it's just how these things work now (haven't seen one for a while), or something I've managed to do with my FF settings. But it gains some added hilarity from the fact that the right-click menu still appears after I close the "warning" box.

  4. Daniel Rutter Says:

    Yeah, that depends on how the browser and the brillant code interact. Classically, you could do something like click the right button again before cancelling the alert box and get the menu when you released it for the second time. I haven't figured out how to make this example do something like that, on (my particular config of) Firefox, Chrome or IE6.

    I did just notice that after you get two alerts, Chrome gives you a neat option to "Prevent this page from creating additional dialogs". If you tick the box the alerts go away, but you still don't get a right-click menu.

  5. Red October Says:

    In my experience you can more or less defeat those annoying little boxes by hitting "Escape" a fraction of a second befoe another right click, but that one in particular seems immune... I've always pondered at the massive stupidity of those little things, even before I knew how to bypass them (by methods as crude as clicking quickly or sophisticated as disabling javascript), I would save images I wanted by using "Print Screen" commands and easily cropping the desired image out and saving it.

  6. oddparity Says:

    I recently ran into this as well, so here's how to switch off JavaScript right-click menu overrides in Firefox:

    Tools -> Options -> Content -> Advanced (Next to "Enable JavaScript") -> Untick "Disable or replace context menus"

  7. Stark Says:

    Awww...they changed the message to a simple copyright notice. I guess e-bay didn't find it amusing having their name invoked for such stupidity.

  8. Coderer Says:

    I would love to see Firefox add a whitelist for that "replace context menus" toggle -- I do not want e.g. Ebay to be allowed to handle right clicks at all, but if I set that option it also prevents Google Maps from being able to give me a custom context menu.


Leave a Reply