rem: if (window.top.SeleniumHTARunner && window.top.document.location.pathname.match(/.hta$/i)) { this.isHTA = true; 
add: try { if (window.top.SeleniumHTARunner && window.top.document.location.pathname.match(/.hta$/i)) { this.isHTA = true; } } catch (e) { this.isHTADetectable = "no, top location couldn't be read in this window"; if (_getQueryParameter('thisIsHTA')) { self.isHTA = true; } else { self.isHTA = false; } 
context: var BrowserVersion = function() {    this.name = navigator.appName;    if (window.opera != null) {        this.browser = BrowserVersion.OPERA;        this.isOpera = true;        return;    }        var self = this;        var checkChrome = function() {        var loc = window.document.location.href;        try {            loc = window.top.document.location.href;        } catch (e) {            // can't see the top (that means we might be chrome, but it's impossible to be sure)            self.isChromeDetectable = "no, top location couldn't be read in this window";        }                if (/^chrome:\/\//.test(loc)) {            self.isChrome = true;        } else {            self.isChrome = false;        }    }    if (this.name == "Microsoft Internet Explorer") {        this.browser = BrowserVersion.IE;        this.isIE = true;        if (window.top.SeleniumHTARunner && window.top.document.location.pathname.match(/.hta$/i)) {            this.isHTA = true;        }        if ("0" == navigator.appMinorVersion) {            this.preSV1 = true;            if (navigator.appVersion.match(/MSIE 6.0/)) {            	this.appearsToBeBrokenInitialIE6 = true;            }        }        return;    }    if (navigator.userAgent.indexOf('Safari') != -1) {        this.browser = BrowserVersion.SAFARI;        this.isSafari = true;        this.khtml = true;        return;    }    if (navigator.userAgent.indexOf('Konqueror') != -1) {        this.browser = BrowserVersion.KONQUEROR;        this.isKonqueror = true;        this.khtml = true;        return;    }    if (navigator.userAgent.indexOf('Firefox') != -1) {        this.browser = BrowserVersion.FIREFOX;        this.isFirefox = true;        this.isGecko = true;        var result = /.*Firefox\/([\d\.]+).*/.exec(navigator.userAgent);        if (result) {            this.firefoxVersion = result[1];        }        checkChrome();        return;    }    if (navigator.userAgent.indexOf('Gecko') != -1) {        this.browser = BrowserVersion.MOZILLA;        this.isMozilla = true;        this.isGecko = true;        checkChrome();        return;    }    this.browser = BrowserVersion.UNKNOWN;}
meta: 3428	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3428/eee8eb9db54254414e988389d2f3f2f744e0550d/selenium-browserdetect.js/clean/code/javascript/core/scripts/selenium-browserdetect.js