Skip to content

Commit

Permalink
new release/firefox issue 49 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelduran committed Jul 26, 2012
1 parent 75beb3f commit da3a53c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 24 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
@@ -1,3 +1,7 @@
Version 3.1.3
-------------
* Fixed Firefox issue https://bugzilla.mozilla.org/show_bug.cgi?id=777397

Version 3.1.2
-------------
* Compatible with Firebug 1.10.0
Expand Down
26 changes: 2 additions & 24 deletions src/firefox/chrome/content/yslow-firefox.js
Expand Up @@ -75,36 +75,14 @@ YSLOW.firefox = {
},

startup: function (wmode) {
var i,
prefs = YSLOW.util.Preference.getPrefList("extensions.firebug.yslow.");

this.windowMode = wmode;

// Preference branch has been changed starting YSlow2, copy over the preference from YSlow1
if (prefs && prefs.length > 0) {
for (i = 0; i < prefs.length; i += 1) {
if (YSLOW.util.Preference.getPref(prefs[i].name) !== undefined) {
YSLOW.util.Preference.setPref(prefs[i].name, prefs[i].value);
}
// delete old pref
YSLOW.util.Preference.deletePref("extensions.firebug.yslow." + prefs[i].name);
}
}

if (typeof Firebug !== 'undefined') {
// PATCH by Adrian Yee (adrian@gossamer-threads.com) GTMetrix
// via exceptional-performance@yahoogroups.com
//
// There seems to be some sort of timing issue with YSlow and
// Firebug which causes an error in YSLOW.FBYSlow.init(),
// "YSLOW.firefox.startup():TypeError: FBL.extend is not a
// function". Hack around this by retrying the call to
// YSLOW.FBYSlow.init() if it fails.
if (typeof FBL === 'undefined' || (typeof FBL !== 'undefined' &&
typeof FBL.extend !== 'function')) {
YSLOW.util.setTimer(function() {
YSLOW.firefox.startup(wmode);
}, 10);
}, 100);
return;
}

Expand All @@ -123,7 +101,7 @@ YSLOW.firefox = {
} else {
YSLOW.util.setTimer(function() {
YSLOW.firefox.startup(wmode);
}, 10);
}, 100);
return;
}

Expand Down

0 comments on commit da3a53c

Please sign in to comment.