Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typeerorr with chrome addon installed #131

Closed
miketaylr opened this issue Jul 10, 2018 · 13 comments
Closed

typeerorr with chrome addon installed #131

miketaylr opened this issue Jul 10, 2018 · 13 comments
Labels
bug difficulty: easy Good issue if you want to learn project mechanics.

Comments

@miketaylr
Copy link
Member

Uncaught TypeError: Cannot read property 'classList' of null
    at content.js:6

str:

  1. install official webcompat reporter addon in chrome
  2. visit webcompat.com and look in console

looks like maybe we need to update that selector (possibly for all addons?)

@miketaylr miketaylr added bug difficulty: easy Good issue if you want to learn project mechanics. labels Jul 10, 2018
@laghee
Copy link
Contributor

laghee commented Jul 10, 2018

Yeah, weird, I don't get the same error in nightly, beta, or release, but it's definitely not hiding the download link in firefox (or fennec).

DevEd console:
screenshot 2018-07-10 16 48 36

@miketaylr
Copy link
Member Author

We probably just changed the classname of the link and forgot to update the content script here in the addon.

@laghee
Copy link
Contributor

laghee commented Jul 10, 2018

Yep, looks like it needs to be replaced with body-webcompat.

@miketaylr
Copy link
Member Author

That might make the whole site disappear... maybe js-addon-link?

@laghee
Copy link
Contributor

laghee commented Jul 10, 2018

😂 oops. Yeah, I guess that makes more sense. I must have found is-hidden in there and gotten confused.

Is it better practice to drill down to the smallest possible element (e.g., not using the outer js-addon block)?

@miketaylr
Copy link
Member Author

Is it better practice to drill down to the smallest possible element (e.g., not using the outer js-addon block)?

As long as we hide the link that we need to, it probably doesn't matter that much.

laghee added a commit to laghee/webcompat-reporter-extensions that referenced this issue Jul 14, 2018
@miketaylr
Copy link
Member Author

screen shot 2018-09-26 at 9 36 59 am

@mbuotidem
Copy link

@miketaylr interested in working on this. Any tips?

@miketaylr
Copy link
Member Author

Cool!

I believe the fix will be to update the selector in content.js, to match the the updated class name on webcompat.com:

<a class="nav-link js-addon-link" href="https://chrome.google.com/webstore/detail/webcompatcom-reporter/ffnnhckjcpbbjlmgfjigknkoffakclol" title="Navigate to Chrome webstore">
            <svg class="icon nav-icon" viewBox="0 0 30 30" role="presentation" aria-hidden="true">
                <use xlink:href="#svg-download2"></use>
            </svg>
            <span class="link-text">Download Chrome Add-on</span>
        </a>

To verify it's working locally, with Chrome, install your local addon, go to webcompat.com, and make sure there's no console errors, and also that the "Download Chrome Add-on" link is hidden.

@miketaylr
Copy link
Member Author

Oh wait... I think @laghee did this.

laghee@5039161

@miketaylr
Copy link
Member Author

We really need to get better at closing out fixed issues. 😓

@miketaylr
Copy link
Member Author

(and publish an update to the chrome store)

@miketaylr
Copy link
Member Author

Arf, not fixed yet. There's a PR.

@miketaylr miketaylr reopened this Sep 26, 2018
laghee added a commit to laghee/webcompat-reporter-extensions that referenced this issue Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug difficulty: easy Good issue if you want to learn project mechanics.
Projects
None yet
Development

No branches or pull requests

3 participants