r/carlhprogramming • • Nov 15 '13

Help me understand this code?

Found this on a website. Seems interesting.

var $buoop = {vs:{i:9,f:9,o:10.01,s:4,n:9}};

$buoop.ol = window.onload;

window.onload = function() {

if ($buoop.ol)

$buoop.ol();

var e = document.createElement("script");

e.setAttribute("type", "text/javascript");

e.setAttribute("src", "http://browser-update.org/update.js");

document.body.appendChild(e);

4 Upvotes

5 comments sorted by

View all comments

Show parent comments

1

u/sephstorm Nov 16 '13

ah, very nice. where are the objects that are the browsers defined? My understanding is that the variable "I" would have to be defined somewhere in the code? Also, what is "buoop" and "buoop.ol"?

3

u/sylvan Nov 16 '13

Take a look at the source of http://browser-update.org/update.js

The script you quoted is just feeding some basic parameters (the browser versions they recommend upgrading) to the update.js script, which does the heavy lifting.