Closed miketaylr closed 5 years ago
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:
We probably just changed the classname of the link and forgot to update the content script here in the addon.
Yep, looks like it needs to be replaced with body-webcompat
.
That might make the whole site disappear... maybe js-addon-link
?
😂 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)?
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.
@miketaylr interested in working on this. Any tips?
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.
Oh wait... I think @laghee did this.
We really need to get better at closing out fixed issues. 😓
(and publish an update to the chrome store)
Arf, not fixed yet. There's a PR.
str:
looks like maybe we need to update that selector (possibly for all addons?)