I have an idea that would be very convenient to have on this site @.:A-MAN:.
What if we had the ability to quickly select a name if we put down "@"? Writing your name A-Man is always a pain haha
@.:A-MAN:. if you start at the caret index and travel left until you reach a space or -1, then check the right character for @, then the speed doesn't depend on the status length, but the continuous characters to the left. Would prob travel for at most 10 chars in typical cases.
@.:A-MAN:. You could track all @'s and check for changes, but if you have caret position, you'll likely have the index of the caret in the text, and can just test if the text to the left starts with an @ on input changes.
Hmmmmmmmmmm might be able to pull up a list of friends like for messages. Hard part is how to detect it and where to show it. If I can access the caret's DOM position then I could show it there... Not sure what the best approach for detection is though. The naive way would be to track X characters after an @ keystroke but that doesn't work for revisiting an incomplete name after tapping somewhere else.
Please Login To Post
Jk we could use throttling or a web worker if we're insane