News for hackers. Stuff that matters.
Re:Comcast injects JavaScript into webpages to show copyrigh... by supernintendo on Thursday November 19, 2015 @02:03AM (#10593201)
Out of curiosity, I wanted to know what the maximum z-index is. The CSS 2.1 spec doesn't present this information, but it turns out to be 2147483647 (the maximum value for a 32-bit integer).

Now what does that z-index say about the JavaScript developer who chose it? "Fuck it, 999999 is enough." Man, what a tool.

Re:Comcast injects JavaScript into webpages to show copyrigh... by duderific on Thursday November 19, 2015 @04:01PM (#10597631)
A one-second google search turned up this: http://stackoverflow.com/questions/1118198/how-can-you-figur...

They should just use that to find the highest z-index, then add 1. Totally future proof.

Re:Comcast injects JavaScript into webpages to show copyrigh... by DrJokepu on Thursday November 19, 2015 @03:19AM (#10593441)
*signed 32-bit integer
Re:Comcast injects JavaScript into webpages to show copyrigh... by rym_ on Thursday November 19, 2015 @02:09AM (#10593215)
Not a JS developer at all, what does a zIndex of 99999 do?
Re:Comcast injects JavaScript into webpages to show copyrigh... by SquareWheel on Thursday November 19, 2015 @02:12AM (#10593227)
This is actually CSS, not JS. z-index sets the layer of an element, so a higher z-index means that content will appear above other content.
Re:Comcast injects JavaScript into webpages to show copyrigh... by mentando on Thursday November 19, 2015 @02:29AM (#10593281)
Well it is a very high zIndex, which of would force the element in the plane 99999.

What it says about the developer though, is that he didn't bother reading up on, what is the highest value, but just chose a rather high value of 99999.

Re:Comcast injects JavaScript into webpages to show copyrigh... by adrianN on Thursday November 19, 2015 @03:30AM (#10593480)
Clearly he wanted to future-proof his code. Maybe in a while he'll need to display an even more important message.