Closed Zahuczky closed 6 months ago
Shiver me timbers, here's what's new, matey:
New Class Added
We've added a new class named CommentReply
. Think of a class as a blueprint for creating objects (a particular data structure), providing initial values for state (member variables or attributes), and implementations of behavior (member functions or methods).
Changes to the CommentReply
Class
We've changed the name of id
to commentReplyBtn
, makin' it easier to understand what this property does. We also changed shouldRun
to /\/view\/\d+/
which is just a clever way of saying we've improved how this part operates.
Two New Properties
Two new properties replyTo
and commentId
have been added to the CommentReply
class. These two new pieces of information help us keep track of our conversations better.
Changes to the inject
Method
The inject
method of the CommentReply
class now has more functionalities, meanin' it can do more than it used to before.
The setupReplyBar
Method
We've added a new method, setupReplyBar
, to the CommentReply
class. Then, we gave it even more tasks to perform.
CodeMirror Updates We added a new event listener that cleverly removes mentions from the CodeMirror editor. An event listener basically waits for something to happen and then takes action. In this case, it removes any unwanted mentions.
Changes to the removeMentionFromCodeMirror
Method
We've added a new method called removeMentionFromCodeMirror
to the CommentReply
class. Then we decked this method out with some more abilities.
These changes be keepin' things neat and organized, plus helpin' us track and manage conversations in a superior way.
Half of that summary is incorrect, just read the diff. (I guess it gets confused by added ;
's)
I don't trust AI summaries either way :p Looks like I installed that app 8 months ago, I completely forgot about it since nobody opens PRs to my personal repositories..
Re: https://github.com/ArjixWasTaken/Nyaa-Utility/pull/20#issuecomment-2094220924
Finish the reply button.
Seems like this was already half implemented to do what I was doing in the other branches. Now it adds the markdown mention to the comments, removes it when the X is pressed, or the user wants to reply to someone else instead. (it only deletes the one it has to, other mentions or markdown links are unaffected)
I'm not a frontend developer myself, I have barely any experience with JS/TypeScript/whatever else this uses, so it might be a bit janky.