shazbot

@shazbot@kbin.social
8 Post – 76 Comments
Joined 1 years ago

I've taken a stab at a client-side theme here that should be easy for people with zero technical literacy to install. The main goal was to parameterize the options and create a more forumlike layout. This is merely a stopgap measure, but has greatly improved the readability for me.

1 more...

Check kbinStyles and kbin-css (my theme)

Using this approach, I am seeing none of those posts on /science. I updated the filters a bit today. The top post is a legitimate article from 2024-04-13 and is by HeartyBeast.

Now, I understand that this is seen as an unnecessary step (too fancy) for some. People want zero ads out of the box without anything extra. So I'm thinking about the next approach here.

Framing the problem:

  • Filtering should be automatic
  • End-user wants zero additional setup
  • There is no active upstream development
  • It's not possible to inherit moderation of a magazine due to some queue of moderator application requests that is not being approved

The third point and fourth points are important here, since that's currently intractable. You can't reconcile zero additional setup with that.

But let's suppose becoming moderator of a defunct magazine (point 4) were possible while point 3 remained unresolved. In other words, at least moderators can try to pick up the pieces. Something being underestimated here is how annoying it would be for the moderator to manually cull posts every single day. I think you would have instant turnover after a couple of weeks once the tedium sets in. Manual solution is not good. Clearly, automation is needed on the moderation side.

So assuming you could actually inherit a magazine, but with no guarantee of upstream development, what about restructuring the tool above so that it's for moderators, instead of end-users? That's pretty easy, and I could make it something the moderator clicks once and it's done, auto-banning the posts. This is a pretty good method.

But you can't inherit moderation right now, so that's back to square one.

Realistically, that leaves these options at the moment:

  • Wait (a long time) and see
  • Use the tool above and make magazines readable, albeit at some sacrifice of convenience (?)
  • Migrate to another instance

Third approach is the path of least resistance and is best for most casual users. Second is for diehards who cannot move instances due to some personal or technical reason. First approach is the most annoying and eventually leads to the third approach after frustration sets in.

Pick your poison, I guess. I can't think of any other prophylactic approach at the moment, maybe this comment triggers some idea.

I was kind of leery of making this global because I didn't want it to affect thumbnails on the thread index, since they must be confined to a finite area, whereas in a thread they can flex downward. (The fetched image can be an arbitary size.) But it looks like they don't use the same selector, so should be safe.

Edit: I've updated it to support thread index, inline images, and profile pages and the differing aspect ratios

Alright, I've updated it to 0.0.5 and now it handles both inline and fixed-size index thumbnails. The thumbnails on the index get cropped to fit the hard dimensions of the squares and maintain the correct aspect ratio. In the case of inline images, they just get scaled to 50% of the original size with no constraint on the height.

You can use this for the time being: https://kbin.social/u/the\_thunder\_god/subscriptions

Most of these are supported in my theme (if you don't mind the austere appearance), and can be used in conjunction with my scripts to add what you asked for.

As for no. 2: not sure what you are referring to by "all," here. What content specifically? You mean show everything before the page fold?

As for no. 3: what page is that? Aren't magazines appended with an @ if they are on other instances?

Also check https://kbin.social/m/kbinStyles for a wealth of other client-side scripts to hot-rod your experience

Sorry if that was unclear. If you look at the dependencies at the top of the instructions, you need the Stylus extension. I believe it's only available in Firefox and Chrome. Once you have the extension installed, navigating to scripts like that one will bring up an install menu that lets you load the script and choose the parameters you want. It looks like this

I'll update the README tomorrow to make this clearer.

1 more...

@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. And because the mod puts each comment into its own container for the purposes of threading nested chains of comments, this will trigger the creation of as many mores as there are indendation levels. So for a comment chain 5 replies deep, there will be 5 mores. This is further exacerbated when toggling the mod on and off, since these mores are not getting wiped and will just keep getting stacked up. Since this is also 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.

Hi, this feature is still available and working in KES under Threads > Permanently Hide Posts. The hide link appears next to the more button, not inside of the more menu. Give it a try.

Alright, those index thumbnails are confined to a 220x145 square, so we can handle those separately by using the cover method of the object-fit property to scale them. Give me a minute to update it...

If your main goal is exporting your magazine subscriptions between accounts across instances, may I suggest trying EXIT tool. If you are looking for more complex export settings (friends/favorites?), unfortunately, only subscriptions are supported at this time.

Could you point me to some of the magazines where you feel this is particularly rampant right now?

19 more...

No u r

Sure, I could make it a toggle.

2 more...

In theory yes, but it looks like the full URL doesn't actually reside on the index page. The article entries just contain a truncated TLD. I agree that the article title should click through to the full source rather than opening comments.

OK, I was able to reproduce it. It doesn't apply to posts where the thumbnail is auto-extracted from an upstream page. It only applies to posts with an attached image (a meme pic etc). I've made a note to fix it.

You can run them concurrently with each other, just stick the ones that work in one version into the respective extension, no need to migrate them all. That's what I do. GM syntax has evolved a lot over the years and I don't think the extensions have 100% parity with each other without using workarounds like unsafeWindow, which is generally frowned upon

My opinion on it is that adding non-critical frontend suggestions to a project already in its infancy creates needless noise for the developers working on structural/backend changes. Moreover, such suggestions may clash with the designers' own vision. Client-side changes are seamless in that they can be continuously modified in a non-invasive manner after the fact if the end-user does not like the designs being made upstream, which (quite likely) may be the case even after the project is stable. So there is good reason for them to coexist. Moreover, insofar as such changes are in JavaScript or CSS, they serve as a proof of concept that the upstream developers can deploy into their existing codebase if they later decide they like those third-party fixes.

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

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.

Root cause analysis and solutions are described in a subsequent comment

@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.

3 more...

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.

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.

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)

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

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?

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

You don't like bufo toad venom? I like to start my mornings by sipping a little bufo toad venom while reading kbin. Buy bufo toad venom today.

In all seriousness...I don't know if you saw my last thread about KES in this magazine, but I suggest giving it a try. I've extended the filter coverage based on your feedback, and those magazines should essentially be expunged of garbage for the time being.

As for the sidebar, I believe the implementation is fundamentally flawed because it loads content that, AFAIK, doesn't respect your actual block settings. I suggest disabling the random threads element altogether in KES by navigating to General > Hide sidebar elements.

16 more...

Of course, I'm not trying to suggest that a third-party prophylactic tool is a definitive solution to what is ultimately a separate problem, just trying to be pragmatic here and restore basic readability for end-users, whether the filtering is done at the source or after the fact.

Let's be real here, we are talking about unmoderated magazines on an instance where the developer is AWOL and using a framework that is lacking many basic features. Even with moderators, manual moderation can be a big ask and is time-consuming for free volunteers, depending on the volume of posts or how rudimentary the moderation tools are.

I actually don't read kbin magazines much, so I wasn't aware of the extent of the problem until I started opening those magazines more closely, and felt that something is better than nothing.

On the magazines you mentioned, I do see a few anomalous patterns that I'll start filtering. For the most part, with filtering enabled, they were almost entirely free of garbage, save for a few patterns I may have missed on the first few passes. /programming and /food I need to take a deeper look at. The /food thing is good intel, because the use of Amazon referral links in the threads is something that can be generalized to other situations beyond books. Posting referral links is definitively block-worthy.

I also noticed some stuff that by any other name would be considered a thinly-veiled ad, such as specific users only posting articles to web sites they own and operate. I'm not talking about bots as such, but actively promoting one's own content--even when such content is on-topic for the magazine. I declined to filter this stuff yet, because it received a lot of upvotes and seemed to be received favorably, maybe because the readers felt it was at least germane to the topic at hand? I think this is probably true for /food as well, because the line between "content" and "promotion" is unclear here, since what is a food blog if not a product generating click revenue? It seems like the tolerance threshold for that sort of thing is higher in a magazine like /food versus some other magazine. Anyway, I digress. I'm not treating such stuff as in scope, just filtering what is blatantly noise.

14 more...

I don't read magazines in-depth much either, so I wasn't aware of the extent of the issue at first, but I was appalled at what I saw. I agree with you that it creates a negative impression for anyone wanting to venture into or use a magazine. I know that needing KES upfront may be a non-starter for some people, but for me the difference with filtering is night and day now.

A few suggestions that may or may not be satisfactory for you:

Using KES, enable General > Hide sidebar elements > Random threads, Random mags, Random posts. The randomly populated sidebar is fundamentally flawed; I suggest disabling its content altogether.

Next, enable General > Filter advertisements. This second feature is by no means foolproof, but will reduce a lot of noise, and is periodically updated on a rolling basis.

I have this as well for a few days

I think violentmonkey doesn't respond well to jquery in some situations, I'll have to pick through the documentation. I'd recommend tampermonkey as a close alternative

2 more...

This is done to force re-cache of the new version of a userscript when it gets added as a feature. MINOR version bumps indicate addition of a mod (userscript) or internal feature, while PATCH version bumps indicate a hotfix. By design in GM, when the version number of the main script is bumped, it will redownload the requisite remote resources. We leverage this functionality to serve new files.

This should partially be rectified by the addition of the changelog link (flask icon) in 1.2.0.

When new mods are added to KES, they are integration tested, so bumping the MINOR version does imply some feature change to the KES interaction itself, albeit not necessarily at the code level.

The userscripts are not updated separately, they are cached once per KES version download. Hope this makes sense.

Hi, this should be fixed on all *monkey versions now if you wish to try again

Alright, I've updated it with a toggle and opened a ticket for it here. You can navigate to the install script again and it will prompt you to 'Update Style" on the left sidebar.

If this is satisfactory, I will close the ticket, otherwise let me know what resolution display you are working with and how much dead space we are talking about here. If you want to submit other issues, the best place to do so would be through there, although you must register an account to submit tickets. I am happy to fix any bugs or issues you find or entertain other ideas.

If you feel strongly about it, I've added a sponsor button to the top of the repository. I maintain a collection of open-source projects (chiefly QoL utilities for Linux) there, so if you throw a few bucks at one, you'd be contributing to the ongoing maintenance of all of them. Thanks.

Thanks, will continue adding to it on a rolling basis and it should auto-update every 24 hours if enabled to do so in the settings. If you see anything that should be changed, let me know.

The mobile display is more compact and seems generally usable out of the box as a web app. On desktop it defaults to this mobile-style layout and it's not ideal.