Определения браузера в JavaScript
Определения браузера от Gareth Heyes:
//Firefox detector 2/3 by DoctorDan FF=/a/[-1]=='a' //Firefox 3 FF3=(function x(){})[-5]=='x' //Firefox 2 FF2=(function x(){})[-6]=='x' //IE IE='\v'=='v' //Safari Saf=/a/.__proto__=='//' //Chrome Chr=/source/.test((/a/.toString+'')) |
Всё вместе:
B=(function x(){})[-5]=='x'?'FF3':(function x(){})[-6]=='x'?'FF2':'\v'=='v'?'IE':/a/.__proto__=='//'?'Saf':/s/.test(/a/.toString)?'Chr':'Op'; |

(1 votes, average: 4,00 out of 5)