Just found on a site that told me to upgrade to IE7 or higher.
ROFL.
kudos to team-noir.net for making me laugh
<snip>
[...]
* 1.3 Google Chrome & new Safari detect added by www.team-noir.net
*/
[...]
// Check for Chrome < Version 2.0
var chrome = userAgent.indexOf('chrome');
if (chrome > -1) {
var snip1 = chrome+7;
var version = userAgent.substring(snip1, (snip1+1));
if (version < 2) {
return true;
}
}
return false;
[...]
<snap>
If you dont find it funny here is a hint
var version = userAgent.substring(snip1, (snip1+1));
get one char from the browser string. chrome was going version+1 every ~half year and now every 2-3 months or so, so it was clear that you hit the two character version number earlier than other browsers (if you assumed 1/2y v+1 => 2012). we are as of this writing at version 14 (stable).
since you know code you build most likely does not receive cleanup or maintenance that is very good coding practice, NOT.
version 10 came out in march.
so for half a year they run this obsolete and poorly thought through script on their own site as well as their customers and/or who ever installed it themselves.
another indexOf('.'); and then just use those two indexes ... naah lets just use one char and screw everybody when they go two digits .... the guys Y2k had constraints but I'm damn sure a javascript var can hold 2 chars ... ok enough ranting ...
if you are using it replace the chrome check with this:
// Check for Chrome < Version 2.0
var chrome = userAgent.indexOf('chrome');
if (chrome > -1) {
var snip1 = chrome+7;
var sub = userAgent.substring(snip1);
var version = sub.substring(0, sub.indexOf('.'));
if (version < 2) {
return true;
}
}
but be aware that there are more then just those five browser out there and so you still show this message to browser that are perfectly fine or people masking there user agent for various reasons.
Mark Anthony
I'm 32 years old, vegan and student of computer science at Uni Frankfurt.
Categories
| < | 2011 | > | ||||
| < | September | > | ||||
| Su | Mo | Tu | We | Th | Fr | Sa |
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | |
Todo List:
- Finish old ics module
- use ::kob::ics vcalendar suport
to show private google calendar
- rebrush (light)
- add a method to hide private
images from unauth. users