Live data from Hacker News

How Optimum.net hijacks a browser request for jQuery from the Google CDN

pastebin.com

1–4 of 4 posts

Re: How Optimum.net hijacks a browser request for jQuery from the Google CDN

#3

Can someone explain what exactly this does?

If you run the JS in the console you see a "powered by optimum" graphic. which I guess would appear on every website that has jquery loaded from google. Which is a ton of sites.

Re: How Optimum.net hijacks a browser request for jQuery from the Google CDN

#4

Can someone explain what exactly this does?

From what I can tell (which is not much), it searches the document for a script tag calling jQuery from Google's CDN and then tries to load its own payload by AJAX.

n(z) makes the ajax call (I think z is the url) (with a pretty nifty looking stack of functions inside an array), r(y,B) builds html elements (where y is the tag name and B is a text node inside the tag, and any subsequent arguments are mapped as tag attributes), and that's as far as I got until it gave me got a headache and decided life was too short.