Skip to content

Commit

Permalink
Update upvoteStory() to remove the jQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
ymeynot45 committed Jun 27, 2022
1 parent 2d4a33a commit e5a9e1c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/assets/javascripts/application.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ var _Lobsters = Class.extend({
commentFlagReasons: { <%= Vote::COMMENT_REASONS.map{|k,v|
"#{k.inspect}: #{v.inspect}" }.join(", ") %> },

upvoteStory: function(voterEl) {
Lobster.vote("story", voterEl, 1);
},
flagStory: function(voterEl) {
Lobsters._showFlagWhyAt("story", voterEl, function(k) {
Lobster.vote("story", voterEl, -1, k); });
Expand Down Expand Up @@ -462,6 +459,7 @@ class _LobstersFunction {
}

upvoteStory(voterEl) {
Lobster.vote("story", voterEl, 1);
}

vote(thingType, voterEl, point, reason) {
Expand Down Expand Up @@ -573,7 +571,7 @@ onPageLoad(() => {

on('click', 'li.story a.upvoter', (event) => {
event.preventDefault();
Lobsters.upvoteStory(event.target);
Lobster.upvoteStory(event.target);
});

on('click', 'li.story a.flagger', (event) => {
Expand Down

0 comments on commit e5a9e1c

Please sign in to comment.