Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

fixed ff-console null errors w/ if(!null) wrappers #10

Merged
merged 1 commit into from

3 participants

@pdkl95

I added a couple if() wrappers around lines that have been showing up as errors in the firefox browser-console. I'm not sure why these were happening in the first place, but the workaround is simple and only touches lines that were failing anyway. Maybe somebody more familiar with the source can check if the error this is hiding is actually relevant.

This is a workaround for this issue mentioned in the forums:
http://forums.chrispederick.com/discussion/386/document-getelementbyid-is-null-7333

@chrispederick

Thanks for the pull request.

@chrispederick chrispederick merged commit c0e87ce into chrispederick:master
@Ciwan1859

I see this annoying error at work all the time. @pdkl95 how do I get your change? Do I have to re-install web developer toolbar?

Thanks

@pdkl95

It seems there isn't anything past version 1.2.5 in addons.mozilla.org - I just built a new .xpi from the source when testing that fix.

Here, I'll run the ant build script again, and stuff it into a release...

[Err.. hmm. It seems I cannot upload files to releases on github, as it requires you to drag-and-drop a file. This, of course, requires a graphical file manager.... which I haven't had installed in like a decade. (still using E16 + bash/urxvt for all file management). As a temporary workaround, I will simply stuff the files into a branch.]

You can get the .xpi with my fix here:
https://github.com/pdkl95/web-developer/tree/release_workaround/release_workaround

WARNING: it was build off the master branch a the time of the fix, which my include other changes/bugs/issues. Use with caution!

@Ciwan1859

Thanks @pdkl95 :) How long ago did you grab the master branch for fixing? Was it 14 days ago?

Thanks

@pdkl95

Yah, as noted above. So it's still current with master; I just haven't looked into the other post-1.2.5 changes that much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 8, 2014
  1. @pdkl95
This page is out of date. Refresh to see the latest.
Showing with 15 additions and 9 deletions.
  1. +15 −9 source/firefox/javascript/overlay/overlay.js
View
24 source/firefox/javascript/overlay/overlay.js
@@ -537,14 +537,18 @@ WebDeveloper.Overlay.setupViewSourceWithKeyboardShortcuts = function(keySet)
// Handles a tab being selected
WebDeveloper.Overlay.tabSelect = function()
{
- // If a feature that uses the element information toolbar is active
- if(WebDeveloper.Dashboard.isOpenInDashboard(WebDeveloper.Locales.getString("elementInformation")) || WebDeveloper.Dashboard.isOpenInDashboard(WebDeveloper.Locales.getString("styleInformation")))
- {
- document.getElementById("web-developer-element-information-toolbar").hidden = false;
- }
- else
- {
- document.getElementById("web-developer-element-information-toolbar").hidden = true;
+ var el = document.getElementById("web-developer-element-information-toolbar");
+
+ if (el) {
+ // If a feature that uses the element information toolbar is active
+ if(WebDeveloper.Dashboard.isOpenInDashboard(WebDeveloper.Locales.getString("elementInformation")) || WebDeveloper.Dashboard.isOpenInDashboard(WebDeveloper.Locales.getString("styleInformation")))
+ {
+ el.hidden = false;
+ }
+ else
+ {
+ el.hidden = true;
+ }
}
WebDeveloper.Overlay.resetCSSStatus();
@@ -826,7 +830,9 @@ WebDeveloper.Overlay.updateJavaScriptStatus = function(error)
// Updates meta redirects
WebDeveloper.Overlay.updateMetaRedirects = function(browserElement)
{
- browserElement.docShell.allowMetaRedirects = !WebDeveloper.Preferences.getExtensionBooleanPreference("meta.redirects.disable");
+ if (browserElement) {
+ browserElement.docShell.allowMetaRedirects = !WebDeveloper.Preferences.getExtensionBooleanPreference("meta.redirects.disable");
+ }
};
// Updates the render mode status button
Something went wrong with that request. Please try again.