Sha256: bc36c5c2df5d1a10b61a7691f763c45c2532aed1a4af95a00726a82adecc7cc0

Contents?: true

Size: 997 Bytes

Versions: 4

Compression:

Stored size: 997 Bytes

Contents

function testsvg() {
    var isOpera = (navigator.userAgent.toLowerCase().indexOf("opera") != -1);
    var ieVersion = navigator.appVersion.match(/MSIE (\d\.\d)/);
    var safariVersion = navigator.userAgent.match(/AppleWebKit\/(\d+)/);
    var operaVersion = navigator.userAgent.match(/Opera\/(\d*\.\d*)/);
    var mozillaVersion = navigator.userAgent.match(/rv:(\d*\.\d*).*Gecko/);
    

    if (ieVersion && (ieVersion[1] >= 6) && !isOpera) {
        var dummysvg = document.createElement('<svg:svg width="1" height="1" baseProfile="full" version="1.1" id="dummy">');
        try {
            dummysvg.getSVGDocument();
            dummysvg = null;
            return true;
        }
        catch (e) {
            return false;
        }
    }
    
    if (safariVersion && (safariVersion[1] > 419))
        return true;

    if (operaVersion && (operaVersion[1] > 8.9))
        return true
    
    if (mozillaVersion && (mozillaVersion > 1.7))
        return true;
    
    return false;
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
old_sql-1.16.0 public/javascripts/old_sql/plotkit-0.9.1/tests/testsvg.js
old_sql-1.15.0 public/javascripts/old_sql/plotkit-0.9.1/tests/testsvg.js
old_sql-1.14.0 public/javascripts/old_sql/plotkit-0.9.1/tests/testsvg.js
old_sql-1.13.0 public/javascripts/old_sql/plotkit-0.9.1/tests/testsvg.js