Make Disqus work with Hydejack's color toggle and transfer animation #355
+32
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For the demo, check https://felixnie.com or https://draftz.felixnie.com. The comment system might change since I'm trying to bring more (like Waline) to my beloved themes, so here is how it looks:
This PR carries out several fixes for issues that most Disqus users will encounter with Hydejack. They are:
page.identifier
parameter required by Disqus.The first issue is spotted on my Safari browser.
The issue is first spotted on Chrome, and is probably fixed by the Chromium team. (confirmation required)
Link: https://stackoverflow.com/questions/65260505/disqus-iframe-transparency-wont-work-on-chrome-87
The last fix reloads Disqus 500ms after the clicking event. The color transfer animation takes ~250ms. Disqus will check the text color to decide which mode it is. So it's better to wait till the animation finishes.
Remember to set your dark mode text color properly so that it's bright enough: