The Right Click

For a few hours yesterday the front page of the New York Times was stealing right clicks. If I right-clicked on a hyperlinked headline (or option-clicked, or made a two-fingered tap on the trackpad), I did not get the usual context menu; instead, I was taken directly to the target of the link. This is the proper behavior for an ordinary mouse click—or a left click with a two-button mouse—but not for a right click.

The first time this happened, I thought it was just a slip-of-the-finger, but the error was consistently repeatable across two different machines and three different browsers (Firefox, Chrome, Safari). Furthermore, it affected only the New York Times. Indeed, it was only the front page of the Times that was misbehaving; right clicks elsewhere in the paper worked normally.

The cause of this problem may have been an innocent goof, but I’m skeptical. When the Times first put up a paywall, not quite a year ago, readers quickly found holes in it. One of those holes involves right-clicking a link to get a copy of the URL, pasting it in the browser address bar, and removing the referrer cruft following the question mark. My guess is that someone at the Times decided it was time to close the hole.

I hasten to add that freeloading is not my reason for right-clicking on Times headlines. I pay my $15 per doublefortnight. But my newsreading habit is to peruse the entire front page, opening each article that interests me in a separate tab. The “open in new tab” command lives in the right-click contextual menu.

Regardless of why the Times was interfering with my Second Amendment right to bear mouse buttons, I was curious about how they were doing it. They weren’t just disabling the contextual menu entirely. (You can read a scornful account of that nefarious practice at About.com, which identifies itself as “A part of The New York Times Company.” (Not, in my view, the best part.)) On the NYT front page, right clicks worked as usual in ordinary text; they were only hijacking right clicks on links.

Regrettably, I’m not going to be able to answer the how’d-they-do-it question. Before I could find the offending code, some grownup at the Times called off the whole crazy experiment, and normal right-clickery was restored.

Although I couldn’t find the click-stealer, I found plenty else. The Times, it seems, prints all the JavaScript that fits. Some of it is unsurprising. jQuery is loaded. There are scripts to run slide shows and videos, to manage cookies, to serve ads, to provide menus and other navigation aids. But there’s lots more:

  • beacon.js This may have something to do with all those little files named 1px.gif floating around like packing peanuts.
  • revenuescience.js Apparently a product of an outfit called Audience Science. “AudienceScience is processing trillions of behaviors per day and over 270 billion attributes at any given moment.” You don’t say.
  • krux-4.7.2.js The web site of Krux (which I had never heard of before) says: “Krux helps large and small websites control, energize, and responsibly monetize consumer data across screens and sources.” Reading further, I get the impression they are in the business of preventing snoopers from snooping on the snoopers who snoop on us. I’m certainly not having much luck snooping on their code. It looks like this:

    function(a){e(a)||A(b,c(a))}),h(b,c(a[1]),e(f)?f:function({o.js.apply(null,j)})):h(b,c(a[1]));

  • gw.js Even deeper obfuscation. I believe this is a JavaScript program whose function is to write another JavaScript program into the page header. It seems to be one of the tools that Audience Science uses to process those trillions of “behaviors” per day.

Phooey on them, I say.

This entry was posted in computing, modern life.

4 Responses to The Right Click

  1. billb says:

    On the Mac in Firefox, Cmd+Left-click will open in a new tab without need for the context menu. There’s a similar incantation for Windows (and for the other browsers). On Linux for sure, and the others, I think, as well, middle clinking the link will, or can be made to, do the same.

  2. John Cowan says:

    On Windows (but not in IE) you can use Ctrl+left-click or middle-click (if your mouse has a middle button or a wheel) to open in a tab. But it’s unclear where those gestures are being translated: it may be low-level enough that whatever shut down right clicks might have shut them down too.

  3. brian says:

    Thanks for the workarounds, only some of which I knew about.

    One of the remarkable features of the Web—perhaps unique among media—is how much power and control the reader retains. The concept was there at the start, 20 years ago, with the idea that the author would mark up structure and semantics, and the reader would determine how it’s displayed. That’s a division of responsibility that was never possible with printed documents, and it goes against the grain in publishing formats like PDF. How long will it survive in the world of HTML/CSS/JavaScript? I don’t know, but I still take offense when an outfit like the Times has the effrontery to think they can fool around with my mouse buttons.

    (And by the way, I’m a fan of the Times. Needless to say, there are lots of web sites that do far sleazier things. It’s because I respect the Times that I’m most bothered by their misbehavior.)

  4. Chris K says:

    I disable javascript for them by default - NYT is pretty bad about breaking out of frames in my feed reader.

Leave a Reply to John Cowan Cancel reply

Your email address will not be published. Required fields are marked *

*

In addition to the basic HTML formatting options offered by the buttons above, you can also enter LaTeX math commands. Enclose LaTeX content in \( ... \) for inline mode or \[ ... \] for display mode.