Donmai

[Userscript] EventListener

Posted under General

EventListener checks at regular intervals for new events of interest.

Available event types: flags, appeals, comments, notes, post edits, commentaries, approvals, forum posts, wikis, pools, dmail, feedback, bans, mod actions

Installation

Project page
Main script
Usage notes
  • Post query events
    • comments, notes, commentaries, post edits, approvals, flags, appeals
    • Uses a post query (Help:Cheatsheet) when checking for new events
    • A blank query line will return all events
  • Subscribe events
    • comments, notes, commentaries, post edits, approvals, flags, appeals, forums, wikis, pools
    • Will return events for subscribed instances
      • For posts: comments, notes, commentaries, post edits, approvals, flags, appeals
      • For forum topics: forum posts
      • For wiki pages: wikis
      • For pools: pools
    • Post-type and topic-type events can be set to show all events on uploads and topics created by the user
    • Post-type events can be auto-subscribed to for your own uploads
      • The subscription only occurs when visiting the post page for each upload
    • Post-type events can be subscribed to en masse using post query controls on the settings page
  • Other events
    • dmails, spam, bans, user feedbacks, mod actions
    • Will return all events with some exceptions
    • Bans can be filtered to remove autobans
    • Feedback can be filtered to remove autofeedback
    • Mod actions has 39 categories that can be subscribed to

Available event filters:

  • Events created by user
  • Untranslated commentary
  • Auto-feedback
  • Auto-bans
  • BUR post edits
  • Post edits by the added/removed tags.

Normally, closing the event notice will hide any other notices that are open in other pages. Clicking the LOCK link prevents that for that particular notice. Clicking the READ link will keep the notice from popping up in other new tabs without having to close the notice.

Settings for the script can be changed on the Danbooru account settings page (https://danbooru.donmai.us/settings). Go to Userscript Menus, and click to the EventListener tab. Turning off event types will cause the subscribe links for those types to no longer appear.

Final

Any suggestions or feedback is appreciated.

Latest edits

  • (2024-02-08)
    • Version 23 Added user setting
      • Will keep notice from showing when no events occur but there is more to query

Versions

Show
  • (2017-11-26)
    • Version 2 - Initial release
  • (2017-11-27)
    • Updated the language in this OP
    • Version 3
      • Added post appeals
      • Set recheck interval to once a minute
  • (2017-11-29)
    • Version 4 - Added Dmails (normal and spam)
  • (2017-12-18)
    • Version 5
      • Added Comments
      • Comment subscribe links on post/show, comment/group-by-post, and comment/group-by-comment
  • (2017-12-25)
    • Version 6
      • Added Forums
      • Topic subscribe links on topic/show, topic/index, forum/show, and forum/index
  • (2018-01-01)
    • Version 7 - Open full Dmail on notice
  • (2018-01-29)
    • Version 8
      • Added notes
      • Ability to render notes
  • (2018-05-12)
    • Version 9 - Use library + refactor code
  • (2018-08-27)
    • Version 10 - Add artist commentary <nonamethanks: Discord>
    • Changed UI in post/show and topic/show views
      • Updated to use latest library + refactor code
  • (2018-09-06)
    • Version 11 - Add setting menu
  • (2019-01-11)
    • Version 12 - Add post edits <nonamethanks: Discord>
      • Added limits to each type for the event check
      • Detect when overflows to those limits occur
      • Dected a user's absence
  • (2019-01-27)
    • Version 13
      • Hide subscribe links for disabled event types
      • Fixed issue with reenabling event after long period
      • Changed default enabled event types
      • Added cache editor to menu
  • (2019-02-14)
    • Version 14 - Updated to newest library
  • (2019-07-24)
    • Version 15
      • Add wiki event
      • Add pool event
      • Add mark all as read capability
  • (2019-10-05)
    • Version 16
      • Add thumbnail support to pools
      • Fix overflows on pool descriptions
  • (2019-11-09)
    • Added more usage notes
    • Updated language
  • (2019-12-09)
    • Version 17
      • Add several new events (post approvals, user feedbacks, bans, mod actions)
      • Separate events into operation types (post query, subscribe, other)
      • Updated the color scheme to adapt to changes to Danbooru's theme (i.e. light/dark)
      • The event notice is saved so that it loads faster on page reloads
    • Updated the topic title
    • Updated usage notes
  • (2019-12-22)
    • Version 18 Updated library version
  • (2020-06-19)
    • Version 19
      • Events can be subscribed to for a user's own uploads/topics
      • Post edits were added to the post query type
      • Flags and appeals were added to the subscribe type
      • Post edits can be filtered by tag adds/removes
  • (2020-07-23)
    • Version 20
      • Added filter for BUR post edits
      • Added overflow controls
  • (2019-08-29)
    • Version 21 Updated library version
      • Users can now be subscribed to
      • Added ability to search for any changed tags on post edits
  • (2022-02-19)
    • Version 22 Updated library version
      • Events from users can now be filtered
      • Updated mod action categories
  • (2024-02-08)
    • Version 23 Added user setting
      • Will keep notice from showing when no events occur but there is more to query

Updated

...are you sure this is a good idea? We don't need any more flag-related drama.

flags against yourself

Against the post, not the user! Don't take it personally.

Honestly, it's better if the original uploader stays out of discussions about whether a picture belongs here or not - they obviously think it does, and they're more likely to be defensive/aggressive about it.

parasol said:

Honestly, it's better if the original uploader stays out of discussions about whether a picture belongs here or not - they obviously think it does, and they're more likely to be defensive/aggressive about it.

But a notice is still welcomed in my opinion. As the uploader, there should be a reason why you uploaded something and one should be able to state your opinion...as easy as possible.

Chiera said:

But a notice is still welcomed in my opinion. As the uploader, there should be a reason why you uploaded something and one should be able to state your opinion...as easy as possible.

Or learn from your mistakes.

parasol said:

...are you sure this is a good idea? We don't need any more flag-related drama.

Against the post, not the user! Don't take it personally.

Honestly, it's better if the original uploader stays out of discussions about whether a picture belongs here or not - they obviously think it does, and they're more likely to be defensive/aggressive about it.

You can already see which posts of yours are flagged by doing user:yourusername status:flagged every two-three days. This script simply makes the process less painful. Someone who is likely to get upset about their posts getting flagged would probably already check regularly for flags by his own.

parasol said:

Against the post, not the user! Don't take it personally.

I'll grant you that, though such was not my intention when I wrote it. Regardless, I updated the language in the OP.

Anyways, this program doesn't really change anything. Users that check regularly were going to do so anyways. It only simplifies the process and makes it more timely.

Pushed Version 3 which adds in the check for post appeals. It only checks for posts appealed by someone other than yourself on your own uploads.

I felt that these don't get as much attention as the flags, which is the primary motivator for adding this.

Pushed Version 4 which adds in the Dmails check. This was honestly my primary motivator for this script in general, as I always found it a pain to have to navigate to a new page (sometimes two in the case of spam) before knowing if the message was important enough to merit immediate notice.

Edit:
  • Minor versions
  • (2017-12-01) 4.1 - Fix of hasevents flag.
  • (2017-12-13) 4.2 - Fix of DMail last ID drift.

Updated

Pushed Version 5 which adds in the comments check. Subscribe links are on the post and comments page. Also, it doesn't take any additional resources the more comments you subscribe to. It basically checks every new comment against your subscribed list, and displays those that are a hit.

Edit:
  • Minor versions
  • (2017-12-19)
    • 5.1 - Fixes updating the comment subscribe list
    • 5.2 - Fixes updating the last IDs
  • (2017-12-20)
    • 5.3 - Fixes delay in switching links for very long lists

Updated

Pushed Version 6 which adds in the forums check. It functions much like the comments check. One primary difference is how it displays any forum post hits since the index table of forum posts only displays an excerpt. To account for this, I added in some links which will pull in the full forum post on demand and display it.

Edit:
  • Minor versions
  • (2017-12-19)
    • 6.1
    • Fixed link formatting in tables
    • Change how appeals/flags are collected and filtered

Updated

Pushed Version 8 which adds notes. These are useful for those waiting for translations, but also for those that translate to detect when another has updated one of their translations. With the event notice the note can be rendered, which converts the HTML from what is normally shown in the note table to what it actually looks like.

As a side note, this was finally made possible due to the recent deployment of issue #3495.

Edit:
  • Minor versions
  • (2018-02-02)
    • 8.1 Fixed bug in comment link subscriptions
  • (2018-04-12)
    • 8.2 Fixed bug introduced by recent deployment of Danbooru causing different index orderings

Updated

Pushed Version 9 which went through a major refactoring to use the library, reduce the code size (~20%), and make it more modular for easier additions in the future. Externally though, it pretty much functions the same.

  • Minor versions
    • (2018-08-02)
      • 9.1
        • Add more variable specifications
        • Turn off debug messages by default
    • (2018-08-03)
      • 9.2
        • Converted script to use available functions instead
      • 9.3
        • Fix coloration of links due to jQuery upgrade
      • 9.4
        • Lowered specificity of link color to avoid clobbering user name colors
    • (2018-08-12)
      • 9.5
        • Upgraded to latest version of library
        • Added several concurrency functions
        • Various other fixes, refactors

Updated

Pushed Version 10 which primarily adds artist commentaries. It also went through a library change and code refactor (~20% less). The biggest notable difference is the change in UI. Since the post navigation submenu was getting crowded, I moved all of the subscribe links to their own submenu. Additionally, I added in the capability for multifunction links.

  • Post/Show
    • Comments - comments
    • Notes - notes
    • Artist commentary - commentary
    • Translations - notes, commentary
    • All - comments, notes, commentary
  • Topic/Show
    • Topic - forum topic
    • Email - unrelated to EventListener
      • Performs the same subscribe action as before which sends an email once a day on topic updates

The colors are green for subscribed, and orange for unsubscribed.

Minor versions
  • (2018-08-28)
    • 10.1 Only show artist commentary when there are translated portions <nonamethanks: Discord>
  • (2018-08-30)
    • 10.2
      • Organize notes by post ID <nonamethanks: Discord>
      • Ability to lock notices open so that they can be read later <Unbreakable: Discord>
      • Reading forum posts from the notice marks the topic as read

Updated

Pushed Version 11 which adds a settings menu available on the same page as the Danbooru settings (My Account >> Settings) under Userscript Menus. The specific settings for this script are under the tab EventListener. The settings "should" instantly reflect in all other open tags with the latest version of the script running. The factory reset is only partially handled right now, only hiding all interfaces in other tabs until a page refresh.

Minor versions
  • (2018-09-13)
    • 11.1 Use updated jQuery load mechanism
  • (2018-09-21)
    • 11.2 Decode encoded email addresses from Cloudflare
  • (2019-01-03)
    • 11.3
      • Updated library version
        • ~20% reduction in code size
      • Refactored code to standard

Updated

Pushed Version 12 which adds post edits as an event type. Since that endpoint is so slow though, it has been limited to checking at most 200 items per page load, whereas all the others have now been limited to 1000. If it detects an overflow though (i.e. the limit was reached), it will keep rechecking at each page refresh regardless of the recheck interval user setting.

Additionally, an absence tracker has been added to the userscript. If more than a day has passed since the script was last run, it offers the user an option to update everything at once regardless of the limits above, with an activity indicator as feedback. If more than a month has passed, it offers the user an option to reset all the positions to their most recent values and disregard any events that occurred prior.

Minor versions
  • (2019-01-15)
    • 12.1
      • Added thumbnail support <nonamethanks: Discord>
      • Both post edits and notes
  • (2019-01-16)
    • 12.2
      • Reduced unnecessary network call by staggering limit boundaries
      • Fixed logic for processing events
  • (2019-01-25)
    • 12.3 Added autocomplete to menu search query control <nonamethanks: Discord>

Updated

Pushed Version 13 which does several new minor things, including:

  • Hide subscribe links for disabled event types
  • Fixed issue with reenabling an event after a long period of being disabled
    • It was using stale bookmark positions, which would cause it to be significantly behind
    • Which would take it a while to catch up plus it would report a lot of older events
  • Changed which events are enabled by default on install/factory reset
  • Added the cache editor being prototyping (forum #154196)
    • It can currently only view or delete program data, but will eventually be able to edit it
    • Added an expandable section which details all of the program data and what they do
Minor versions
  • (2019-02-06)
    • 13.1 - Fixed issue with the "All" subscribe link on the post page

Updated

Pushed Version 14 which primarily integrates the new library code that was finalized yesterday. This is coming out as a major version since a large majority of the code was changed while updating to the new library version and standardizing all of the affected userscripts.

Additionally, all of the menus were standardized, and fully working cache editors were incorporated. Also, a new control was added under cache settings which shows the size of all the userscript data amongst all of the various data storage.

Minor versions
  • (2019-02-14)
    • 14.1
      • Fixed issue with missing thumbnails <Unbreakable: Discord>
      • Fixed issue with locked notices not staying open <Unbreakable: Discord>
    • 14.2
      • Fixed missing subscription control <Unbreakable: Discord>
  • (2019-02-20)
    • 14.3
      • Fixed variable name
  • (2019-03-07)
    • 14.4
      • Fixed absence notification incorrectly firing
  • (2019-05-09)
    • 14.5
      • Add use of "only" parameter
  • (2019-05-10)
    • 14.6
      • Updated library
  • (2019-05-10)
    • 14.7
      • Updated library

Updated

1 2 3 4