Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Flash detection // Performance Issue #2206

Closed
ibolmo opened this Issue · 2 comments

3 participants

Olmo Maldonado Fabio M. Costa Arian Stolwijk
Olmo Maldonado
Owner

(from Lighthouse).

The Flash detection should be transformed in an "on-demand" method.

In IE Browsers you lose some seconds on initialization, and you really don't need to do the check by default.

so, here is my proposal:

(function() {

var version;

var detect = function() {
    if (!version) {
        version = (Function.attempt(function(){
            return navigator.plugins['Shockwave Flash'].description;
        }, function(){
            return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version');
        }) || '0 r0').match(/\d+/g);
    }
    return version;
}

Browser.Plugins.Flash = {
    version: function () { return Number(detect()[0] || '0.' + detect()[1]) || 0 },
    build: function () { return Number(detect()[2]) || 0}
};
})()
Fabio M. Costa
Collaborator

:+1:

Arian Stolwijk
Owner

Fixed in 9609878 by moving it into 1.4compat

Arian Stolwijk arian closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.