BetterSavedSearches provides an alternative mechanism and user interface for a user's saved searches. This includes more frequent checking, better feedback information, and finer control.
Installation
- Chrome/Firefox: Install Tampermonkey
Project page
Main script
https://raw.githubusercontent.com/BrokenEagle/JavaScripts/stable/bettersavedsearches.user.js
Usage notes
Settings can be modified from your Danbooru user edit page, (My Account >> Settings) under Userscript Menus.
In the settings menu is a user setting to turn off the script, allowing it to be turned on/off on a subdomain basis.
More Details
Initialization
The first run of the script will query every single saved search to seed all of the query entries. This means that the more queries you have, the longer it will take to finish initializing. To give an idea, 70 saved searches, took around 15 seconds to finish loading.
Post Index
This is where the main user interface is installed. Saved searches are organized by labels alphabetically. Queries under each label are also organized alphabetically.
Post Show
Supports sequential navigation of search queries on posts that are clicked from the post index.
Click
Clicking various items on the interface will yield different effects.
- "Toggle List" - Hides or shows the saved search list (this setting is saved between page loads).
- triangle - Expands or contracts the query list under a label (not saved with some exceptions).
- headers - Reloads the page showing all of posts for that category that have been collected by BetterSavedSearches.
- "Saved Searches" - Shows all of them. Equivalent to search:all.
- labels - Shows all under a label. Equivalent to search:LABEL.
- queries - Shows all of the posts under a query. Equivalent to QUERY.
- arrows - Reloads the page using the actual search metatags (what Danbooru has collected) or query lines (actual queries).
- last item - Provides various controls to modify that line in some fashion
- (##) - Performs the same action as headers above, but only shows the unseen posts since the last time checked.
- red X - Clears all of the posts from that level, and marks it as disabled.
- circular arrow - Performs a fresh query at that level
- NOTE: (##) -> red X -> circular arrow -> (##)
- "Last Updated - Red X" - Resets the post progress to the present, skipping all posts
- Useful for after long periods of absence
Hover
Hovering over various items will show different information.
- calendar - Last time that the query was updated/rechecked.
- header - Shows the full header text, in the case that the label/query is too long.
- Query lines with pool IDs used will show the query as it is stored, however hovering over it will show popup text with the pool name.
- last item
- (##) - Total number of posts collected for that query/label.
- red X - ditto
Style
There are a variety of styling effects used to indicate various conditions
- green text - Indicates the presence of metatags in a query. Labels are highlighted if any are metatags.
- underlined - Indicates the query is disabled. Labels are highlighted only if all are disabled.
- bold - Indicates the active query selected from the prior page load.
Caveats
Metatags are handled differently from other queries, and will only be refreshed in under a day.
Disabled affects regular and metatag queries differently. For metatags, it completely shuts them down. For regular, it will continue to collect new posts, but won't perform queries. This allows a user to track how many posts a query has had since a certain point in time, kind of like a trip indicator. Some queries may automatically be disabled if the seed query find zero posts.
Saved Search Index
This is where some alternative management functions are at.
A link has been added to the top submenu called "Refresh BetterSavedSearches(#)" which performs a synchronization and normalization of the saved searches saved on Danbooru and the script.
An interface has been added to the bottom that allows a user to create new saved searches without having to use the controls provided by Danbooru on the post index. So now all management can be done from one page, i.e. add, edit, or delete.
Program details
Show
Standard operations include a recheck every 5 minutes (user default), performing a variety of collection actions.
- Initial pass: Any post older than 5 minutes gets processed (will catch most uploads from users that tag well).
- Posts between 5 - 60 minutes old get saved for a second pass.
- Second pass: Any post older than 1 hour gets processed (will catch most uploads tagged by others that tag well).
- Metatag check: Metatag queries are given a random 16 - 24 hour expiration (user default). Queries that are expired get rechecked.
- Random check: One query is chosen each hour (user default) for a recheck. Favors queries the longer they've gone without being updated, that have more posts per time period, and that have more success when performing the random check.
Final
Any suggestions or feedback is appreciated.
Latest edits
- (2022-09-04) Updated OP
- (2022-03-12) Script is no longer being supported
Versions
Show
- (2018-07-30)
- Version 2 - Initial release
- (2019-06-01)
- Version 3
- Settings menu
- Full pagination
- Sequential navigation
- Progress indicator
- (2019-07-12)
- Version 4
- Results shown on profile page
- Robust pagination/sequential navigation
- (2019-08-20)
- Version 5
- Better recheck mechanism
- More query info tracked and displayed
- (2020-01-01)
- Version 6 Updated library version
Updated