Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function isIE9() {
- return navigator.appName.indexOf('Internet Explorer') !== -1 && navigator.appVersion.indexOf("MSIE 9") !== -1;
- }
- function isIE10() {
- return navigator.appName.indexOf('Internet Explorer') !== -1 && navigator.appVersion.indexOf("MSIE 10") !== -1;
- }
- function isOldIE() {
- return isIE9() || isIE10();
- }
- function isIE() {
- return ((navigator.appName === 'Microsoft Internet Explorer') || ((navigator.appName === 'Netscape') && (new RegExp('Trident/.*rv:([0-9]{1,}[.0-9]{0,})').exec(navigator.userAgent) !== null)));
- }
- // If the browser is Edge, returns the version number as a float, otherwise returns 0
- function getEdgeVersion() {
- var match = /Edge\/(\d+[,.]\d+)/.exec(navigator.userAgent);
- if (match !== null) {
- return +match[1];
- }
- return 0;
- }
- function isFirefox() {
- return navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;
- }
- function isSafari() {
- return navigator.userAgent.toLowerCase().indexOf('safari') !== -1;
- }
- function isChrome(){
- return window.chrome !== undefined
- }
Add Comment
Please, Sign In to add comment