FIMFiction UserScripts 383 members · 0 stories
Comments ( 11 )
  • Viewing 1 - 50 of 11

A collection of miscellaneous tweaks to Fimfiction comments.

Install

Install a userscript manager like Violentmonkey or Tampermonkey. (It may work with Greasemonkey or other userscript managers, but I haven't tested them.) Also ensure that you're using a reasonably modern browser (the script requires ES6 support).

Then, click here to install from GitHub. The userscript is also available on Greasy Fork.

Features

Some less important features are omitted for brevity. For the full list, see the GitHub page.

  • Comment collapsing: Collapse a comment and all of its "descendants"

  • Forward hiding: Clicking and expanding a link to a "forward" comment will hide the original comment

Quote links

  • Expanded callbacks are grouped below the comment header in order of expansion (means expanding one comment won't push down the rest of the callbacks)
  • When possible, cross-page quote links show the username and comment index instead of the comment ID
  • Hovering on an expanded link does not show its comment
  • Quote links to the parent comment are disabled (helps prevent infinite/redundant expansion)

Cosmetic

  • When there are multiple quote links in a child comment, the link to the parent comment is underlined
  • Comments shown on hover are the width of the comment list (instead of the width of their parent comment)
  • 150ms quote link hover delay shortened to 85ms
  • Increased comment width (by decreasing right padding) for deeper nesting

Miscellaneous

  • Comments do not expand with expanded child comments
  • Embeds (image, YouTube, etc) work in expanded comments
  • Loaded embeds will not autoplay when appearing in hover comments (should work for YouTube, Streamable, Gfycat, and Twitch, but probably not Soundcloud)
  • The previous/next page buttons update the URL hash (i.e. the visited page will be added to the browser history)

Mobile

Most of these features don't apply to mobile, but the script does work on the mobile site (assuming you can run userscripts on your mobile browser). The differences/features are:

  • Quote links will show usernames instead of numbers (and the index for cross-page links, etc.)
  • Collapsing a comment collapses just that comment, and not any of its descendants
  • Forward hiding only works with the "Newest First" ordering, as there are no callbacks
  • Right padding is not decreased (it causes an overflow, and deeply nested comments can't fit on mobile screens anyway)
  • Hover comments are disabled (they can accidentally be triggered, and don't look good)

Help

Bugs can be reported on the GitHub issues page or here on Fimfiction, whichever works.

Let me know if it's unclear how a feature works or why a feature exists. Many of the tweaks only apply in specific or obscure situations, or come down the personal preference. So, it's hard to concisely describe them. (Explaining why each tweak exists would make this too long. But maybe I could write up a separate document if people want.) The words I use might also be unclear ("quote link", "callback", "parent comment"). Sorry about that—I'm not aware of standard terminology for these things, so I adopted terms from Fimfiction's source code or used my own.

I'm also not sure if people will want all of the tweaks this script provides. Maybe they'll only want a subset. I don't currently have plans to make a configuration UI, but if you only want to disable a few tweaks, I may be able to help you edit the script to do so.

These are some very nice quality-of-life tweaks! And I think I found a minor bug: when visiting links to a comment that's not on the first page, for example this one, the site will switch to the correct page, but fail to highlight and jump to the comment, with the following error message displayed on Chrome:
Uncaught (in promise) TypeError: Cannot read property 'classList' of null

Sollace
Group Admin

6873952
hey, awesome! It's great to see activity here. :twilightblush:

Also a lot of nice features for comments. Does this also fix the bug of youtube videos playing in the background from quoted comments?

ssokolow
Group Contributor

Might I suggest putting it up on Greasy Fork?

You can connect it to the GitHub repo so all you have to do is push changes but Greasy Fork has three advantages over hosting on GitHub alone:

  1. It'll make sure that all the metadata is properly formatted so the userscript manager will consider it to be an acceptable source for automatic updates.
  2. Updates have to pass certain checks before going public (mostly the @require whitelist), so users can feel safer about installing your script.
  3. Your script will appear in the listings when people search Greasy Fork for scripts affecting fimfic.

(OpenUserJS is the competing alternative, but their developer-facing documentation is quite anemic, so I haven't been able to check how their feature set compares aside from that, judging by their TODO list, the automatic safety checks aren't as good.)

6873986
Thanks for catching this. I've pushed v0.1.1 which fixes the bug.

6874181
Is this the bug you're talking about?

  1. Click on a YouTube embed. The video loads and begins playing. Pause the video.
  2. In another comment, hover over a quote link to the comment with the video.
  3. The video begins playing in pop-up comment, when we'd like it to be in the "preview" state instead.

If so, it wouldn't be too hard to fix. I wonder if the same behavior should apply to other embeds though (e.g. Imgur, Gfycat, Streamable). Should they always be in a "preview" state when appearing in a hover comment, or should they be loaded if you've already clicked on them in the original comment?

6874204
Hmm, I originally didn't post the script to Greasy Fork or OUJS because I didn't want to deal with hosting on a separate site. The script doesn't use @require, and I figured people who use userscripts on Fimfiction probably frequent this forum more than either of those sites. But it looks like it only takes a few clicks to upload a script, so I'll think about it.

Sollace
Group Admin

6874334
Eeyup, exactly! Just hover over the reply link and it will start playing. It will also continue to play after the preview has been closed.

ssokolow
Group Contributor

6874334

But it looks like it only takes a few clicks to upload a script, so I'll think about it.

It's also a one-time cost. After the initial setup, you can use "Admin > Source Syncing" to make the script itself and the "Additional info" portion of the description update automatically from another location.

There are three ways it supports doing it.

  • Automatically - it will be periodically checked for updates
  • Manually - it will be checked for updates only when you trigger it
  • By webhook - it will be updated when you push changes to this file on your repository

(Naturally, I recommend the last option)

6874356
Okay, I think this should be fixed now.

6874443
The script is now up on Greasy Fork.

I have a encountered a bug. I noticed that with the script enabled, I can't expand the Youtube embed from this blog post: https://www.fimfiction.net/blog/873515/dramatic-reading-of-fragments

7012474
Thanks for the report. I've pushed v0.2.1 which fixes this.

Minor update: v0.2.2 updates the comment count (i.e. the "Comments ( 43 )" header) on mobile when the refresh button is clicked.

  • Viewing 1 - 50 of 11