forked from forem/forem
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor initializeArticleReactions.js (forem#4303)
* Refactor initializeArticleReactions.js - Refactors file according to eslint rules - Add showModal and sendHapticMessage to globals in eslintrc.js - Shorten initializeArticleReactions() by distributing parts of it into jumpToComments() and requestReactionCounts() - requestReactionCounts() makes an ajax request to get the reaction counts - jumpToComments() jumps to comments element directly if the element jump-to-comments is present * Fix reactionOnClick function to work correctly - Move sendHapticMessage and showModal global declaration to file - name function on reaction button on click as addReactionOnClick which then calls reactToArticle()
- Loading branch information
1 parent
a9adeee
commit 49fbf28
Showing
1 changed file
with
85 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters