tmort / Socialite

Other
1.68k stars 163 forks source link

"Execute any queued functions" Code to remove? #54

Closed DeanMarkTaylor closed 10 years ago

DeanMarkTaylor commented 11 years ago

The following code appears at the bottom of socialite.js and does not appear to be referenced or used - can this code be removed?

/**
 * Execute any queued functions (don't enqueue before the document has loaded!)
 */
(function() {
    var s = window._socialite;
    if (/Array/.test(Object.prototype.toString.call(s))) {
        for (var i = 0, len = s.length; i < len; i++) {
            if (typeof s[i] === 'function') {
                s[i]();
            }
        }
    }
})();
tmort commented 10 years ago

I'll review and see if we can get it out of there.