gkoberger / BugzillaJS

A userscript that adds additional functionality to bugzilla
https://addons.mozilla.org/en-US/firefox/addon/bugzillajs/
43 stars 18 forks source link

BugzillaJS breaks formatting on some non-Bugzilla websites #130

Closed cpeterso closed 6 years ago

cpeterso commented 6 years ago

STR:

  1. Disable BugzillaJS.
  2. Log into IRC Cloud, e.g. https://irccloud.mozilla.com/.
  3. Enter command /whois zzzzzzzzzzzzzzzzzzzzzzzzzz (or any unused IRC nickname).
  4. IRC Cloud shows a "No such channel/nick" dialog and it looks normal.
  5. Enable BugzillaJS. You don't need to reload the IRC Cloud page or restart Firefox.
  6. Enter command /whois zzzzzzzzzzzzzzzzzzzzzzzzzz again.

RESULT: The "No such channel/nick" dialog is formatting is wrong. It is very wide and missing the white background.

cpeterso commented 6 years ago

Easier STR: Enabling BugzillaJS makes the text on http://www.sfgate.com/ very small.

gregtatum commented 6 years ago

It messes up https://arstechnica.com as well.

Expected result:

image

Actual result:

image
cpeterso commented 6 years ago

And https://www.smartsheet.com/

mnoorenberghe commented 6 years ago

The reason for this is because although most JS rules tried to detect whether they were on a bug page, the CSS was just injected based on the matches rules which are quite inflexible and didn't support things like #129 to limit to specific domains at runtime. I had a workaround to inject the JS in the root of every domain with the JS deciding whether the page was relevant but forgot that the CSS was then inject to the root of every domain too. I've put another workaround in to limit to URLs that are more likely bugzilla installations. It's not perfect but I don't have time to implement #129 now.