Danbooru

[Userscript] Danbooru EX

Posted under General

After I updated to the latest version, I had to do a factory reset on the settings to get it to work. Before doing that, the script appeared to work for a few seconds before reverting to the site without the script. Also, after using the script for a while, it stopped working again like before, which required another factory reset. On a side note, is there some kind of debug output from TamperMonkey that can be seen so that I can more accurately report on what fails.

All of the modes are missing except for View, Tag Script and Preview.

Also, this may not be a huge issue for most, but the script does freak out when "@media screen and (max-width: 660px)" gets enabled in the site CSS. https://img42.com/eBL71

Wasn't able to fully debug because the script stopped for a third time and I threw my hands up at that point... :/

Before doing that, the script appeared to work for a few seconds before reverting to the site without the script. Also, after using the script for a while, it stopped working again like before, which required another factory reset.

Welp, shit. After release I saw a problem like this and pushed a hotfix without bumping the version (stupid of me), so maybe you didn't get the update? Just posted v1322, try that. Also try uninstalling then reinstalling to make sure it updates.

(The problem was the script failing because of it randomly trying to run before Danbooru itself was fully loaded. If it happens again go to the script settings in Tampermonkey and change "Run at" to document-end).

On a side note, is there some kind of debug output from TamperMonkey that can be seen so that I can more accurately report on what fails.

You can hit F12 to open Chrome devtools then open the console tab. If you see any red error messages then something went wrong.

Also, this may not be a huge issue for most, but the script does freak out when "@media screen and (max-width: 660px)" gets enabled in the site CSS. https://img42.com/eBL71

What screen res do you normally use? v1322 fixes some of this, but honestly the site's layout is already kind of crap at that width.

Nope! I just assumed it would work, and of course it turns out it doesn't. Will look into it. Here's a quick release in the meantime:

New Release

v1337: https://github.com/evazion/danbooru-ex/raw/stable/dist/danbooru-ex.user.js
Changelog: https://github.com/evazion/danbooru-ex/blob/master/CHANGES.md
Known issues: https://raw.githubusercontent.com/evazion/danbooru-ex/master/ISSUES.md

This release finally adds a settings page. Go to My Account > Settings > EX Settings and uncheck the options to disable tweaks you don't want. By default everything is enabled.

There seems to be a bug when viewing a post, in that the image overflows onto the tag list on the left. It's particularly bad if the full image size is viewed, and the tag list usually disappears completely, requiring a page reload to get it back.

New Release (v2284)

Danbooru EX: https://github.com/evazion/danbooru-ex
v2284: https://github.com/evazion/danbooru-ex/raw/stable/dist/danbooru-ex.user.js

Major changes for this release:

  • Firefox support.
  • Live preview when editing notes (demo)
  • A way to show more posts in the upload / favorites / saved search sections on user profiles (demo).
Changelog
New features
  • Add button to show more posts in uploads / favorites / saved search sections on user profiles (demo).
  • Add as-you-type live preview when editing notes (demo).
  • Add "ctrl+enter to submit" shortcut for wiki entries / comments / forum posts (or any other dtext box).
  • Add option to enabling looping by default for video with sound posts.
  • Add option to mute video with sound posts by default.
  • Make long usernames (e.g. GiantCaveMushroom) wordbreak better in comments and forum posts.
Fixes
  • Performance improvements.
  • Fix brokenness on Firefox.
  • Fix thumbnail hover previews to work for webm/mp4/ugoira posts.
  • Fix sidebar squashing issues by fitting images to screen width.
  • Make preview panel work on /post_versions, /post_flags, /post_appeals.
Full changelog

BrokenEagle98 said:

There seems to be a bug when viewing a post, in that the image overflows onto the tag list on the left. It's particularly bad if the full image size is viewed, and the tag list usually disappears completely, requiring a page reload to get it back.

I've fixed this, which also incidentally fixed a related Danbooru bug where webm/mp4 posts that are too wide don't fit the screen (see post #1961979).

@Nitrogen​09 said:

Have you tried testing the userscript on Firefox? I couldn't get the latest version to work on it for some reason. Still works perfectly fine on Chrome though.

It should work in Firefox now, although I haven't tested it as much as in Chrome.

Resizing the image in the post view throws off the positioning of the notes. Being able to restore the image size back to the default would help with this. (Because of the behavior noted below...)

Also, the image size (tag column width) carries over between views, even between the post index and post show. Not sure this is the intended behavior...?

Pushed v2317, it should fix the note positioning bug. Although it forces images to always fit to screen width when they're too wide, which I don't know, is that undesirable?

Also, the image size (tag column width) carries over between views, even between the post index and post show. Not sure this is the intended behavior...?

Not sure what you mean, are you talking about the tag sidebar width? It's supposed to be remembered separately, so if you hide the sidebar on the post index, but make it wider on post show pages, those two settings should be retained.

@sweetpe@ said:

I like that hover previews are suddenly working but this prevents me from seeing some handy tool tips.

Perhaps add scores/fav count, arttag, chartag, copytag, and user uploader/approvor to the preview? Much thanks.

I'm working on it, but it's not quite finished. This is what it will look like though: https://i.imgur.com/XmZmvQc.jpg.

In the meantime you can go to preview mode and hover over the image in the preview panel, the tooltips will show up that way. Preview mode shows you the full image too, so lately I use that more than hover previews.

tapnek said:

Does this interfere with the native tagging features for Gold+ accounts? Thinking about using this userscript for tagging.

It does, I had to redesign tag script mode to (hopefully) improve on it. Here's the demo: https://gfycat.com/AnyNewIrukandjijellyfish. (I go slowly for the demo, in reality you can go faster).

Basically, instead of click-to-tag, you click to select posts first, then press Shift+A to tag the whole selection. This takes getting used to, but it enables several improvements:

  • Clicking a post opens a preview panel that shows you the full size image. I can't overstate how useful this is. It finally lets you tag script things too small to see in the thumbnail.
  • If you click the wrong post, no problem, just click again to deselect. No having to stop and fix every misclick.
  • You can see which posts you've selected, which helps keep your place (I often lose track of what I've tagged and what I haven't).
  • You can bulk select multiple posts with dragging or Ctrl+A. Certain kinds of scripting go much faster when you can select everything then deselect only the posts that don't apply.

That said, you can disable this by going to My Account > Settings > EX Settings and unchecking "Enable Mode Menu". But that disables the preview panel, which is the most useful part, so the only new thing is having hover previews as you tag script.

tapnek said:

And what's the difference between this and RaisingK's userscript?

My feature overview is here: https://github.com/evazion/danbooru-ex#main-features. See that and the screenshots. The biggest things I add are hover previews, the preview panel, and the new tag scripting mode.

RaisingK's script does a variety of things, probably the biggest things are:

  • Scores/favcounts can be shown beneath thumbnails.
  • An alternative saved search system.
  • An alternative blacklist system that replaces posts with placeholders, so you can see which blacklisted tags hid the post then click to unhide it.

Also he has an Unlimited Paginator Works script that adds infinite scrolling (i.e, more posts are automatically loaded when you get to the bottom of the page, so you don't have to click to go to the next page, you can just keep scrolling down). I haven't tested our scripts together very well though, so some things aren't compatible.

evazion said:

That said, you can disable this by going to My Account > Settings > EX Settings and unchecking "Enable Mode Menu". But that disables the preview panel, which is the most useful part, so the only new thing is having hover previews as you tag script.

Is it possible to just have like a separate icon next to "More >>" that would lead you to the Userscript Settings? Seems more convenient that way.

evazion said:

I haven't tested our scripts together very well though, so some things aren't compatible.

I keep asking why you guys don't just combine efforts into a single Userscript. Why not?

I probably will switch to put the settings in the header somewhere, you're right, the current way is too inconvenient. Only problem is RaisingK's script and the Better Better Booru script both put their settings there, and I want to avoid a conflict.

I don't think either of us would want to combine them. Both are big and complicated scripts, and coding-wise we do things in polar opposite ways. It's not a matter of just incorporating one into the other; merging the two would mean a total rewrite of one. I'm sure neither of us would want to do that. Not to mention his script has existed way longer than mine, since 2008 I think, so it would be highly presumptive of me to suggest it.

1 2 3 4 5 6 7