[UserScript] More Comment Style Buttons

More buttons


https://greasyfork.org/en/scripts/37604-wanikani-more-comment-style-buttons/code

6 Likes

Nice work!

Also useful: https://superuser.com/editing-help

@DaisukeJigen uhhh, any progress on this? I was looking forward to it

1 Like

Oh dang. I completely forgot about this…
Remember I was having some sort of issue, so took a breather… And forgot apparently. Whoops.

3 Likes

Apparently I removed it from greasyfork, and didn’t have the source myself anymore.
So, complete rewrite. Works much better this time. So far: underline, strikethrough, superscript, and subscript.

2 Likes

Can you also bring out the details, spoiler, and poll, from the menu? Clicking that thing is always annoying

1 Like

Well that was a bigger pain in the butt than I expected, but there ya go.:crazy_face:
Basically had to make buttons that open the menu and click the real button (menu and real button: display = none, so invisibly). Not too bad of code in the end, but figuring out that’s how it needed to be done…
Other paths were close, and would ‘work’ but for whatever reason, wipe everything in the textarea first :unamused:

2 Likes

You’re doing the Crabigator’s work :crabigator:

2 Likes

I have some feedback. It’s great! However

  1. There are still debuggers in there, hehe
  2. Sometimes the buttons to the rightmost don’t load. I know it’s consistent when you load the window with a reply open, but I think there are other situations where it happens too.
  3. The .focus() in the following part makes it so you can’t select any other text field. Not the search and not the poll options.
    $('.d-editor-container textarea').focusout(function(){
        $('.d-editor-container textarea').focus();
        //selectedText = getSelectedText();
    });
1 Like

Man, I am awful at remembering to remove debuggers;
Good point on the focus. Issue was I need focus to be on the textarea in order to know what text is selected. But, can probably add some code in there so it only does to auto-refocusing if I’m still inside the reply area somewhere…
And damn Discourse and its failing to firing things all the time :rage:

1 Like

I need an auto-table-of-contents button :wink:

1 Like

1 and 3 are taken care of.

#2 though

1 Like

You know what’s causing it?

So is this dead? Do you have any source code to share?

1 Like

I haven’t touched this in forever. Source code can be seen right there from your script manager of choice. Don’t think I have anything for it that isn’t published, can’t check for a while. Feel free to try and figure out a workaround for that one issue if you want.

1 Like

I don’t have the script installed so I can’t look in my script manager. :wink:

If you deleted your version maybe @Kumirei still has a copy.

Still available here

https://greasyfork.org/en/scripts/37604-wanikani-more-comment-style-buttons/code

1 Like

Thanks!

I think he originally posted it in a different thread, and that’s why the link isn’t anywhere in this thread

@seanblue @Kumirei Whoops. Probably edited the original post at some point, accidentally deleting the link. :persevere:

1 Like