shazbot

joined 1 year ago
[–] [email protected] 1 points 7 months ago

No, it does not. Could be added, in theory.

[–] [email protected] 1 points 7 months ago

I have made some modifications that should prompt you to click a button to copy the contents to the clipboard, rather than doing it automatically. This is done because Safari only permits modifying the clipboard if there was direct user interaction. Can you try again?

[–] [email protected] 0 points 7 months ago (2 children)

I'll try to reproduce this and look into tightening the error handling. A 404 error should imply that the magazine is not available at the remote. Are those magazines available at the target instance? Agree that those should at least be added to the log--perhaps should add a third category for "Unavailable." Remember that it will also navigate you to the magazines list at the end for visual confirmation.

When you said community subscription, were you referring to something in particular, or just using this term generically to refer to magazines?

[–] [email protected] 1 points 7 months ago

A bit late, but I saw your post and decided to make a tool for this. Hope this helps.

[–] [email protected] 1 points 8 months ago

If using KES, check General > Add mail iconto append an icon/label next to a username to directly message them. (If on the same intance as you)

[–] [email protected] 1 points 8 months ago (1 children)

I had just forgotten something simple (unload the threaded comments CSS):

Before:

removeDangling();
safeGM("removeStyle", "hide-defaults");

After:

removeDangling();
clearMores();
safeGM("removeStyle", "hide-defaults");
safeGM("removeStyle", "threaded-comments");

This is live on testing, but might take a sec to propagate due to GitHub's caching feature.

[–] [email protected] 1 points 8 months ago

You're right, looks like I missed something that was obscured by custom styling.

And good catch on the mores appearing on teardown. This mod is turning out to be quite a beast. Thanks for testing.

[–] [email protected] 1 points 8 months ago (4 children)

@Pamasich

I have resolved the aforementioned issues with a hotfix on the testing branch; please test when time permits. Executive summary:

  1. The mod fully restores the DOM tree to its original state when toggled off. It is now possible to toggle the mod on and off on the same page without reloading, and changes will behave as expected.
  2. For reasons of security, the mod no longer allows clicking the post headers or post body as a means of collapsing/expanding comments. This was attaching unnecessary listeners to elements on the page, with no way of clearing them when toggled off (besides hard refreshing). Now the only approved way of expanding/collapsing is to use the +/- icon or colored bars.
  3. The mod erroneously modified the CSS of profile pictures to give them rounded borders, which was unspecified by its intended behavior and documented nowhere in the description. Now they conform to the standard square format.
  4. The superfluous mores are being removed now for comments with overflow text. What I thought would be a quick fix turned into hours, and I thought I was losing my marbles over this one for a long time, since the tree clearly showed numerous duplicate mores, but only one per comment was being shown at runtime of the script. At first, I did not seriously think that the mod was completing its runtime cycle prior to the duplicate mores being spawned, but indeed this is what was happening. For now, I have added a 20ms sleep before clearing the extra mores, and this seems to suffice to let them propagate before the mod can continue with the cleanup phase. This seems satisfactory for now, short of attaching observers to wait for the duplicate mores to appear.

I believe that covers everything. It should be possible to switch the mod on and off at will now and see no adverse effect.

[–] [email protected] 2 points 8 months ago

@Pamasich @speck

I have completed an audit of the mod and observed the following issues:

  1. Does not properly unset classes and restore the page to an intact state when turned off: this was having the side effect of making the threaded lines look incorrect when toggling on/off in place. The mod should not leave dangling containers around after it is toggled off. The mod creates an outer container so that the "expando" lines flow all the way down through the child elements, but when turned off, these child elements need to be moved back out of the container to be adjacent to each other and the container removed. => Fixed locally.

  2. Does not properly unset event listeners attached to nested comments. Same as above, tends to leave dangling listeners and does not unset itself cleanly. => In progress.

  3. Because it physically manipulates the DOM and moves sub-comments into their own container down the tree, triggers an event (likely a bug) on Kbin's side whereby any time the DOM is updated for that element, Kbin appends a more element (text expansion button) if the text overflows a certain length, even if a more element is already present. You can test this by creating a dummy div above or below a long comment and then moving the long comment before or after that div. Simply moving its position in the DOM will trigger the creation of another more element inside. Since this is an upstream issue, our only alternative here is to walk through the tree and remove the extraneous more elements after nesting occurs. This is similar to your CSS solution, but instead of masking them, physically deletes them, otherwise we will have a constantly growing tree of mores every time nesting happens. I guess this should also be reported upstream as well. Kbin seems to expect no DOM manipulation to occur, which is reasonable, I suppose, but might be better if the callback doesn't insert the more element at all if it's already present. => Easy fix on the Kbin side, in progress.

[–] [email protected] 1 points 8 months ago

I understand the root cause now, will ping you again once this feature is working as expected.

[–] [email protected] 1 points 8 months ago

Thanks for looking into this. I've been meaning to audit this mod, but was a bit busy this week. In light of this report, this seems like as good a time as any.

Unfortunately, the mod is no longer maintained by the original author, so I'll have to inherit it and refactor it. I feel it is overengineered for what it attempts to do, so it should be streamlined and the aforementioned issues fixed. I am also aware of the issue that the mod fails to unset itself properly when turned off. I am really not satisfied with its current functionality.

~~As a long-term solution, I don't know if entirely hiding that expand element is the right play here, since it shouldn't be the mod's business to modify unrelated behavior. After all, what if someone wants to have threaded comments and keep the expansion button?~~ Sorry, just reread the thread and tested your snippet, I see you were talking about the extraneous buttons created, not the original one.

I haven't tested it yet, but I understand the root cause. Presumably the callback on the expansion button applies to the original element and not the child element, so it functionally does nothing when it is nested this way. And the mod shouldn't be reinserting so many elements each time it nests.

[–] [email protected] 0 points 8 months ago (14 children)

I wasn't able to reproduce the issue on a default kbin setup with KES either on off. The "always expand post bodies" feature of KES only applies to bodies, but I could extend it to support comments as well so that they auto-expand. What I didn't observe was any situations where the expansion bar obscures the text. Do you have a screenshot of that?

Are you running a custom theme?

 

This script unsquashes inline images in comments by fetching the source image and downscaling it to 50%.

Edit: also updated it to support the thread index

 

Hello, this is a client-side theme focused on high readability and removing extraneous visual widgets and icons. It is based on the way I liked to read content on that "other site."

Image

For better or worse, the current kbin layout is very "mobile" in design and not the best for reading longform text on a desktop. This theme focuses on easing the layout and hopefully making threads look more forumlike.

It does take a "scorched earth" approach in removing stuff I don't like, but everything that starts disabled can be enabled again via the radio buttons provided, allowing you to toggle on/off various widgets on the fly.

This includes:

  • sidebar
  • footer
  • activity
  • thumbnails
  • previews
  • short description
  • avatars
  • upvotes, downvotes, or both
  • icons
  • elements of the text submission form
  • numerous other elements

In addition, you can change the base color scheme via the color picker in order to globally control things like:

  • body color
  • link colors
  • upvote/downvote colors
  • blockquotes, code blocks, input fields
  • hover/focus color
  • text color
  • etc.

Disclaimer: I have tested this at 1440P on a desktop environment at various scaling levels and dimensions and it seems to mostly be OK. I have not extensively checked for glitches on mobile aside from some rudimentary mocking. If you find something wrong, feel free to make a PR or inbox me.

Frontend is not my main focus area, so there may be some anti-patterns or things that are objectively stupid, particularly around the way I manipulated elements on the grid. Again, if something is being implemented wrongly here, please advise.

 

Hello, this theme is focused on high readability and removing extraneous visual widgets and icons. It is based on the way I liked to read content on that "other site."

Image

For better or worse, the current kbin layout is very "mobile" in design and not the best for reading longform text on a desktop. This theme focuses on easing the layout and hopefully making threads look more forumlike.

It does take a "scorched earth" approach in removing stuff I don't like, but everything that starts disabled can be enabled again via the radio buttons provided, allowing you to toggle on/off various widgets on the fly.

This includes:

  • sidebar
  • footer
  • activity
  • thumbnails
  • previews
  • short description
  • avatars
  • upvotes, downvotes, or both
  • icons
  • elements of the text submission form
  • numerous other elements

In addition, you can change the base color scheme via the color picker in order to globally control things like:

  • body color
  • link colors
  • upvote/downvote colors
  • blockquotes, code blocks, input fields
  • hover/focus color
  • text color
  • etc.

Disclaimer: I have tested this at 1440P on a desktop environment at various scaling levels and dimensions and it seems to mostly be OK. I have not extensively checked for glitches on mobile aside from some rudimentary mocking. If you find something wrong, feel free to make a PR or inbox me.

Frontend is not my main focus area, so there may be some anti-patterns or things that are objectively stupid, particularly around the way I manipulated elements on the grid. Again, if something is being implemented wrongly here, please advise.

view more: ‹ prev next ›