Skip to content

Commit

Permalink
Update flagComment to remove jquery
Browse files Browse the repository at this point in the history
  • Loading branch information
ymeynot45 committed Jun 27, 2022
1 parent e5a9e1c commit ba3bb5d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions app/assets/javascripts/application.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ var _Lobsters = Class.extend({
Lobster.vote("story", voterEl, -1, k); });
},

flagComment: function(voterEl) {
Lobsters._showFlagWhyAt("comment", voterEl, function(k) {
Lobster.vote("comment", voterEl, -1, k); });
},
_showFlagWhyAt: function(thingType, voterEl, onChooseWhy) {
if (!Lobsters.curUser)
return Lobster.bounceToLogin();
Expand Down Expand Up @@ -366,8 +362,9 @@ class _LobstersFunction {

}

flagComment(voterEl) { //requires [_showFlagWhyAt]

flagComment(voterEl) {
Lobsters._showFlagWhyAt("comment", voterEl, function(k) {
Lobster.vote("comment", voterEl, -1, k); });
}

flagStory(voterEl) { //requires [_showFlagWhyAt]
Expand Down Expand Up @@ -597,7 +594,7 @@ onPageLoad(() => {

on('click', '.comment a.flagger', (event) => {
event.preventDefault();
Lobsters.flagComment(event.target);
Lobster.flagComment(event.target);
});

on("click", '.comment a.upvoter', (event) => {
Expand Down

0 comments on commit ba3bb5d

Please sign in to comment.