Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

Fix #8: allow users to favorite articles #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

blopker
Copy link
Member

@blopker blopker commented Jan 14, 2021

Including a pretty heinous hack to get all follow buttons to update. Can you find it?

@C4ptainCrunch C4ptainCrunch temporarily deployed to hotwire-dj-realworld-pr-24 January 14, 2021 07:09 Inactive
@C4ptainCrunch C4ptainCrunch temporarily deployed to hotwire-dj-realworld-pr-24 January 14, 2021 07:13 Inactive
@C4ptainCrunch C4ptainCrunch temporarily deployed to hotwire-dj-realworld-pr-24 January 14, 2021 07:17 Inactive
@C4ptainCrunch C4ptainCrunch temporarily deployed to hotwire-dj-realworld-pr-24 January 14, 2021 07:23 Inactive
Comment on lines +3 to +7
<script>
document
.querySelectorAll("#favorite-{{article.slug}}")
.forEach((e) => e.attributeChangedCallback("src"));
</script>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sneaky... sneaky... 😉

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

Successfully merging this pull request may close these issues.

3 participants