Draggable button with visual feedback! Remembers its position, adapts to screen size, and can't be dragged off-screen. Formats narration/dialogues.
< Janitor AI - Automatic Message Formatting Corrector (Drag & Drop button) 피드백으로 돌아가기
I also tweaked your script so I can edit past messages to match the formatting: https://gist.github.com/rp-coderer/b8782ce06b6d0eed2e2a5e7a6923ca19
Basically, if I "edit" a message by clicking on the pencil and triggering your script, it will prioritize it.
Code is shotty, but it works (in my machine, at least)
I modified the code and now it's one universal script! Also I added a feature to Drag & Drop the button.
Script works perfectly! No problems whatsoever! But I noticed that you have two scripts for mobile and PC, and the only difference between the two is the styling. Use
@media
for it so you don't have to maintain two scripts.At the bottom is my snippet of CSS. It's mobile first, since I use janitorAI mostly on my phone. I also attached two screenshots of mobile and the desktop sizes.
My rationale for the mobile button style: Personal preference, mostly.
I moved the button that the middle left since, there are a lot of empty space on the left side, space taken by the bot avatars. On the right, it will conflict with the other buttons and I fat finger it, lol.