Skip to content

Commit

Permalink
Check for Firebug version so that user error is minimized fixes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkanani committed Aug 22, 2013
1 parent 88f6849 commit 4bbfa3b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
21 changes: 19 additions & 2 deletions extension/chrome/content/spa_eye/spa_eyePanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,25 @@ define([
var scriptPanel = this.context.getPanel('script'),
hooked = this.context.spa_eyeObj.hooked();

var warn = !(hooked && scriptPanel && !scriptPanel.showWarning());
return warn ? this.showNotHooked() : false;
if (!(hooked && scriptPanel && !scriptPanel.showWarning())) {
return this.showNotHooked();
} else {
try {
var v = Firebug.getVersion().split('.');
if (parseInt(v[0], 10) === 1 && parseInt(v[1], 10) < 11) {
return this.showFirebugUpgrade();
}
} catch (e) {}
}
return false;
},

showFirebugUpgrade:function () {
var args = {
pageTitle:Locale.$STR("spa_eye.warning.upgrade_firebug"),
suggestion:Locale.$STR("spa_eye.suggestion.upgrade_firebug")
};
return this.WarningRep.tag.replace(args, this.panelNode);
},

showNotHooked:function () {
Expand Down
3 changes: 2 additions & 1 deletion extension/chrome/locale/en-US/spa_eye.properties
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ spa_eye.logs.noerror=No error recorded during introspection so far.
spa_eye.warning.inactive_during_page_load=Not recognized as a Backbone application or Backbone Eye was inactive during page load.
spa_eye.suggestion.inactive_during_page_load2=<a>Reload</a> to activate Backbone Eye. Please ensure that the Script panel is enabled too.
spa_eye.warning.upgrade_firebug=Spa-eye is not supported with this firebug version.
spa_eye.suggestion.upgrade_firebug=Please upgrade your firebug version to latest version.

0 comments on commit 4bbfa3b

Please sign in to comment.