Danbooru (etc...) userscripts

Posted under General

AkaringoP said:

Danbooru Grass

Injects a GitHub-style contribution graph into Danbooru profile pages.
Visualizes contribution history for Uploads, Approvals, and Notes. You can view data by year, or click on a specific date for details.
Works on all user profiles.

https://github.com/AkaringoP/JavaScripts/tree/main/DanbooruGrass

v2.0 (2025-12-12)

Major Overhaul: Switched from HTML scraping to Raw JSON API. The initial graph loading may take a bit longer depending on the contribution amount.
Database: Added Dexie.js for persistent local caching.
Optimization: Implemented Delta-Updates (Incremental Fetching) to minimize API usage.
Fix: Resolved discrepancy between graph click and search results.

------
EDIT. Fixed some issues for Heavy Users

Updated by AkaringoP

๐Ÿ”ฎ Estimate Last Activity

This userscript estimates a user's last active time and is intended for users below level 40.

Due to limited available data, the results may not be accurate.
Some requests may time out; try refreshing if that happens.

Install

AkaringoP said:

Danbooru Grass

Injects a GitHub-style contribution graph into Danbooru profile pages.
Visualizes contribution history for Uploads, Approvals, and Notes. You can view data by year, or click on a specific date for details.
Works on all user profiles.

https://github.com/AkaringoP/JavaScripts/tree/main/DanbooruGrass

v3.0 (2025-12-13)
  • ๐ŸŽจ Advanced Theme Customization: Added 6 themes including Aurora gradient, with a real-time reactive CSS system.
  • โš™๏ธ Advanced Settings System: Intuitive UI for customizing threshold levels per mode (Uploads/Approvals/Notes).
  • ๐ŸŽ๏ธ Performance Optimization: Implemented parallel batch fetching to improve data loading speed by 3-4x.
  • ๐Ÿง  Usability Improvements: Enhanced UX with last mode persistence, dynamic tooltips, and theme-synced legends.

------
EDIT. Fixed whitespace and day-label color issues.

Updated by AkaringoP

Sort favourite group (console script)

Sorts the posts of your favourite groups by post id. By default it's meant to be ran with a favourite group open but the id can be configured so that you don't need to have the favourite group open to sort it.

Note that your favourite groups are already sorted by post id in the posts page (i.e. entering favgroup:id into the search bar or clicking the title for a search fast travel). This is meant to order posts in the gallery view which appends by default.

Sorting is irreversible as favourite groups are not versioned.

Show
const ID = $("body").attr("data-favorite-group-id"); // const ID = 0;
const FAVGROUP_URL = `/favorite_groups/${ID}.json`
const FAVGROUP_DATA = await $.get(FAVGROUP_URL);

$.ajax({
	url: FAVGROUP_URL, type: 'PUT', contentType: 'application/json',
	data: JSON.stringify({post_ids: FAVGROUP_DATA.post_ids.sort((a, b) => a - b).join(" ")})
});

EDIT: Changed sort function to an arrow function.

Updated by WRS

Danbooru Mobile Note Assist

As the old saying goes: 'Someone who suggests it, implements it.'

Although it doesn't create all notes at once as suggested before, it enables you to work on notes in mobile environments that support UserScripts.

https://github.com/AkaringoP/JavaScripts/raw/refs/heads/main/MobileNoteAssist/MobileNoteAssist.user.js

On a PC, just use what you used instead of this.

Usage

1. โ€‹Activate: On the post page, tap "Note Assist" in the sidebar options or the floating button (๐Ÿ“) to enable the script.

โ€‹2. Spawn: Tap anywhere on the image to create the Note Box.

โ€‹3. Adjust: Drag the box or its corners to fit the text bubble.

    • โ€‹NW / SE: Resize the box.
    • โ€‹SW / NE: Move the box.

โ€‹Tip. Touch areas extend outward so your finger doesn't block the view.

โ€‹4. Edit: Type the translation directly into the text field and toggle tags (e.g., Translated) if needed.

โ€‹5. Save: Tap the Check (โœ”) button. The note and tags will be saved automatically, and the page will reload.

โ€‹Note: Long-press the floating button to move it up or down.

Updated by AkaringoP

this script adds a few shortcuts to post thumbnails for common utilities. no idea how much use, if any, people are gonna get out of this, but it doesn't hurt to have it archived somewhere and i've been happily using it since writing it a couple of days ago.

features:

  • save downloads the post's original image
  • copy copies the post's original image to your clipboard
    • this currently only supports static images and uses some magic to convert the image to a PNG before copying, very much a would-if-i-could type situation, but alas, it's something i have no control over.
  • copy id copies the post's id to your clipboard in post #1234 format
  • artist takes you to a search of more posts by the artist
  • char takes you to a search of more posts of the character
    • for posts with multiple characters or artists, right now it just selects whoever appears first in the tag string.
  • source takes you to the post's source
    • ...or right click to copy the source link to your clipboard

install: pastebin

๐Ÿ“œ Fetch Commentary

If extractor can't fetch artist's commentary from certain sites (such as Bilibili or Weibo), this script lets you retrieve data via APIs of other Danbooru instances (e.g. AIBooru or Cosbooru). You can also add more instances at the top of the script.

Install

Danbooru Insights (prev. Danbooru Grass)

This tool visualizes your Danbooru activity through a GitHub-style contribution graph and a comprehensive analytics dashboard. Transitioning from 'Danbooru Grass' to 'Danbooru Insights,' it now offers deep metrics to help you master your posting habits and community contributions.

https://github.com/AkaringoP/JavaScripts/raw/refs/heads/main/DanbooruInsights/DanbooruInsights.user.js

v4.0 (2025-12-24)
  • ๐Ÿ“Š Comprehensive Analytics Dashboard: Added a new dashboard view accessible via a button next to the username, visualizing post breakdown by Rating, Character, and Copyright, along with Milestones and Top Posts.
  • ๐Ÿ“ˆ Interactive Scatter Plot Widget: A powerful tool to visualize the correlation between upload date and post score, featuring dynamic filtering, and a "Drag & Select" function to inspect specific time ranges or score brackets.
  • ๐Ÿ”„ Enhanced Data Synchronization: Implemented an improved synchronization logic with progress indicators and background processing to ensure a stable and transparent data fetching experience.

Updated by AkaringoP

This userscript is really cool! Unfortunately, it seems to not like syncing for me in order to see my analytics, constantly booting me back to the main sync screen whenever I press "Start Data Fetch". Considering I seem to have a bit of a tech curse in weirdly inconvenient ways as well as being a certified Heavy User (with 21,244 uploads in 2025 alone atm!), I can only interpret it as being overwhelmed by my stats and chosing to nope out on me lol.

There's probably a more logical explanation to that problem tho, so I wanted to let you know.

Knowledge_Seeker said:

This userscript is really cool! Unfortunately, it seems to not like syncing for me in order to see my analytics, constantly booting me back to the main sync screen whenever I press "Start Data Fetch". Considering I seem to have a bit of a tech curse in weirdly inconvenient ways as well as being a certified Heavy User (with 21,244 uploads in 2025 alone atm!), I can only interpret it as being overwhelmed by my stats and chosing to nope out on me lol.

There's probably a more logical explanation to that problem tho, so I wanted to let you know.

I have the same glitch when I try to load your stats; it works fine on mine at a little over 9000 posts. Edit, I was doing some stress testing; it works with Unbreakable's stats, but the contribution grid doesn't show any posts prior to August 9th which I know has to be wrong. It also doesn't see any of your posts prior to June 19. Again, no bugs on my page.

Updated by Placeholder1996

Knowledge_Seeker said:

This userscript is really cool! Unfortunately, it seems to not like syncing for me in order to see my analytics, constantly booting me back to the main sync screen whenever I press "Start Data Fetch". Considering I seem to have a bit of a tech curse in weirdly inconvenient ways as well as being a certified Heavy User (with 21,244 uploads in 2025 alone atm!), I can only interpret it as being overwhelmed by my stats and chosing to nope out on me lol.

There's probably a more logical explanation to that problem tho, so I wanted to let you know.

Placeholder1996 said:

I have the same glitch when I try to load your stats;

Dear friends, it was all because of a silly whitespace issue. While I was at it, I made some other fixes as well. Please give it another look.

AkaringoP said:

Dear friends, it was all because of a silly whitespace issue. While I was at it, I made some other fixes as well. Please give it another look.

Yeah, still got the issue. Can't even get the metadata to fetch past 0%.

Edit: Yeah I think it's due to my very high postcount. Worked like a charm on my considerably less heavy alt.

Knowledge_Seeker said:

Yeah, still got the issue. Can't even get the metadata to fetch past 0%.

Edit: Yeah I think it's due to my very high postcount. Worked like a charm on my considerably less heavy alt.

Ehh is it still not working after the update? I've already confirmed that it works on Unb's profile.

Try the latest version at the link below. If the issue persists, please send me a screenshot of your F12 Console via Dmail. That should help me figure out what's going on.

https://github.com/AkaringoP/JavaScripts/raw/main/DanbooruInsights/DanbooruInsights.user.js (v4.2)

AkaringoP said:

Ehh is it still not working after the update? I've already confirmed that it works on Unb's profile.

Try the latest version at the link below. If the issue persists, please send me a screenshot of your F12 Console via Dmail. That should help me figure out what's going on.

https://github.com/AkaringoP/JavaScripts/raw/main/DanbooruInsights/DanbooruInsights.user.js (v4.2)

Thankfully, Dmail won't be necessary. Whatever you did in this update seemed to fix the issue entirely! Thanks!

...Huh, apparently my most popular (SFW) post atm is post #8434221 I randomly found on Weibo. The Wuthering Waves is too strong.

Updated by Knowledge Seeker

1 11 12 13 14 15 16 17 18 19