Replaced usage of inContentWhitelist with hideChromeForLocation to have more flexibility about URLs to hide.
Bug 783743 - addon-page should work with "index.html?[stuff]" and "in…
…dex.html#[stuff]" (and both together)
- Replaced usage of `inContentWhitelist` with `hideChromeForLocation` to have more flexibility about URLs to hide
I sort of was not comfortable with an idea of overriding window method itself. Maybe it's fine but probably @Mossop knows it better. Also I guess I'm fine with doing this as long as we also have a patch for FF to change hideChromeForLocation such that this hack won't be necessary. Maybe whitelist could contain regexps or functions ?
@Gozala as I wrote in the comment, this is what in MDN is suggested for hiding browser chrome. However I totally understand your uncomfortable feeling, because I had the same. Even if this is what is suggested, it feels an hack to me as well and error prone in some cases. I'm totally in to improve Firefox's hideChromeForLocation / whitelist behavior.
I'm ok with it as long as we're still calling the old function and are properly cleaning up on unload, looks like both of those are happening so looks good. Let's get a Firefox bug filed to make this better though.
I guess I was wrong, this isn't cleaning up after itself properly. Filed https://bugzilla.mozilla.org/show_bug.cgi?id=829845