5 ms·
Firefox 3.6 on Ubuntu 10.4 and the site said: Your installed version of Silverlight is: 0.0.00000.0 So I'm guessing no...
by RK 16y ago
Firefox 3.6 on Ubuntu 10.4 and the site said:
Your installed version of Silverlight is:
0.0.00000.0
So I'm guessing no...
- reitzensteinm 16y agoI do not understand what's going through the mind of a developer who makes a site to display a software version number and does not have a special case for not installed. Incredible.
- pan69 16y agoI guess he was making a site to get the Silverlight version, not whether it was installed or not.
- StavrosK 16y agoIt's Microsoft software. Who would not have it?! Clearly adding the code branch is an unnecessary waste of time.
- hx 16y agoNo, they have a special case for not installed...you just need silverlight to display it.
- Hexstream 16y agoNo keyboard detected. Press any key to continue.
- thebigshane 16y agofunction doit(){ var parts = Array("ver-major", "ver-minor", "ver-build", "ver-revision"); //try firefox/non-IE version. var nav = navigator.plugins["Silverlight Plug-In"]; if (nav) { for (var i = 0; i < 4; i++) { document.getElementById(parts[i]).innerHTML = parseInt(nav.description.split(".")[i]).toString(); //getControl().isVersionSupported("2.0"); } } else { //try the IE one now. try { var control = new ActiveXObject('AgControl.AgControl'); //the following would be faster with a binary search, but this is "fast enough" for now. var vers = Array(1, 0, 0, 0); loopMatch(control, vers, 0, 1); loopMatch(control, vers, 1, 1); loopMatch(control, vers, 2, 10000); loopMatch(control, vers, 2, 1000); loopMatch(control, vers, 2, 100); loopMatch(control, vers, 2, 10); loopMatch(control, vers, 2, 1); loopMatch(control, vers, 3, 1); for (var i = 0; i < 4; i++) { document.getElementById(parts[i]).innerHTML = vers[i].toString(); } } catch (e) { document.getElementById("vers-discrete").innerHTML = "Silverlight not installed."; } } } function loopMatch(control, vers, idx, inc) { while(IsSupported(control, vers)){ vers[idx]+=inc; } vers[idx] -= inc; } function IsSupported(control, ver){ return control.isVersionSupported(ver[0]+ "."+ ver[1] + "." + ver[2] + "." + ver[3]); } doit(); All I can say is... "interesting" EDIT: that is the code they are using as of this posting
- boomhauer 16y agohey, you found my crappy little site ;) the IE version will correctly state "not installed" but apparently the FF/Non-IE is returning a non-null nav object, thus printing the zeros. btw- the reason for creating this site- extracting the exact version number is not straightforward, for some reason. MS decided to let us have isVersionSupported(), instead of a simple getVersion() or similiar. Thus, loop it.
- 16y ago
- RK 16y agoTaking a page from the myriad of sites that require cookies and when cookies are not enabled throw up some horribly cryptic error unrelated to cookies or fail completely.