There is no such script.
There are lot of function and properties which are uncommon between different browsers, so you have to find out browser and write compatible code.
The following script will help you:
var ua = navigator.userAgent
//firefox compatible code