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

GeasyFork site problem support Waterfox Classic ? #202

Closed
decembre opened this issue Nov 13, 2022 · 3 comments
Closed

GeasyFork site problem support Waterfox Classic ? #202

decembre opened this issue Nov 13, 2022 · 3 comments

Comments

@decembre
Copy link

I Notice a problem with Waterfox Classic with date of comments on Greasyfork:
[Waterfox Classic] No Posted Time for Comments

With Waterfox Classic, the Posted time appear briefly and disappear after...

Work on Firefox Quantum:
in it, i notice an "#shadow-root(open)" element.

@keithamus
Copy link
Member

keithamus commented Nov 14, 2022

Thanks for the issue @decembre.

If you're using this custom element in a browser that does not support custom elements, it will revert to whatever the server rendered content is. If you wish for the actual behaviour of this element, it requires Custom Elements and ShadowDOM to work, you'll need to provide polyfills for those if you're interested in supporting older browsers. It looks as though the GreasyFork website does not include any Custom Elements polyfills, which would mean that the use of RelativeTime would fall back to no behaviour.

Briefly attempting to reproduce by visiting https://github.github.io/relative-time-element/examples/ in Waterfox Classic, I can see that it does not support Web Components/Custom Elements by default. Are you perhaps running an extension or user script which provides some kind of custom elements support?

If you're including a custom elements polyfill script or extension in your browser, then this polyfill will either need to fully support ShadowDOM, or explicitly not support it (by not providing the attachShadow functionality). RelativeTime checks for support of attachShadow before using shadowDOM:

#renderRoot: Node = this.shadowRoot ? this.shadowRoot : this.attachShadow ? this.attachShadow({mode: 'open'}) : this

If you are using a polyfill for custom elements which provides that attachShadow method but otherwise does not support ShadowDOM, that may explain the problems you're having.

@decembre
Copy link
Author

Thanks for the explanation!
Because i am only an user of it, I give it to the dev of Greasyfork...

And yes i use, on my side, an extension (very undocumented) named "Polly".
On Greasyfork site, "Polly" is useful here in some case:
It is useful when i want to re Edit a comment.
Without it, i can't re edit a post.

For that, i need to enable "Polly" options:
These 2 options in "Polly" are :
1 - Request modification method for this domain
2 - Pollyfills/Webcomponents-Bundle.js

But... whit these options enable, that break your function....

@keithamus
Copy link
Member

Unfortunately as I can't really see what the "Polly" extension does I won't be able to help any further; a quick web search suggests this extension is no longer maintained and the source code has been removed from their repository.

As this repository works in modern browsers, and falls back gracefully in stock Waterfox, it leaves us with little to go on. Consequently I'll close this issue. You might want to explore alternatives to the "Polly" extension, perhaps if you find one that is actively maintained and still causes issues with this element, then we can explore options then. Thanks for your understanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants