RecentTagsCalc replaces the current recent tags calculated by Danbooru for the tag edit form on uploads/posts. The default settings were designed to emulate the original functionality of recent tags before October 2018. The tags are calculated from both uploads and post edits, after the edit form has been submitted.
The tag list on the edit form works exactly the same as before. Also, the script calculates tags in the background automatically. Please note that this does not occur on tag edits that occur from the post index using the tag script or edit functions.
Tags can be pinned so that they always appear on every page load. This is done by clicking the oval icon next to a tag in the Recent tags list, which will change the oval to solid. To unpin a tag, click the oval icon next to the tag so that the oval icon is empty.
Settings can be modified from your Danbooru user edit page, (My Account >> Settings) under Userscript Menus.
Final
Future additions:
Order by tag usage
Similar to Danbooru's current method
However usage calculations will be user controlled
Have choice for fallback sort when two tags evaluate the same
Such as two tags having the same category for category sort...
...or two tags having the same post count for post count sort
Any suggestions or feedback is appreciated.
Latest edits
(2022-09-04) Updated script link in OP
Versions
Show
(2018-12-31)
Version 2 - Initial release
(2019-01-09)
Version 3 - Cache frequent tags
Fix tab synchronization and concurrency
Rebase and standardize the code
(2019-01-20)
Version 4 - Add category sort
Use form order when post counts are equal (for post order sort)
Pushed Version 3 which primarily adds the ability to cache the frequent/favorite tags, as well as fixing several minor issues such as concurrency and synchronization between tabs.
The caching of frequent tags was added as it was noticed that the frequent tags was taking about 1.5 seconds to load each time the new upload or post edit forms were opened. This also had the effect of causing the recent tags to take the same amount of time since it waits for Danbooru to add those columns before updating them. With the option of caching frequent tags turned on though (it is turned on by default), it can load those tags as soon as it gains execution.
The expiration time on updating the cached frequent tags is currently set at one week, although a control has been added to the user settings which allows for them to be manually updated if needed.
Minor versions
(2019-01-13)
3.1
Remove unnecessary network calls when frequent tags are cached
Pushed Version 5 which adds the ability to pin recent tags, which is done by clicking the circle icons next to the tags so that a pin icon appears. To unpin a tag, reverse the process by clicking the pin icon until the circle icon appears.
Additionally, the multiple tag lists option has been enabled, along with a setting to control the amount of tag groups. To help identify a group better, it also labels each group as the Nth upload or edit.
Finally, the cache editor being prototyped (forum #154196, forum #154240, forum #154285, forum #154332) was added. It's pretty much finalized by this point, so the code will be migrated and standardized across all scripts at the next library update.
Minor versions
(2019-02-08)
5.1 - Fixed pinned tags not being checked on a page refresh
Pushed Version 6 which primarily integrates the new library code that was finalized earlier this week. 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-16)
6.1 - Fixed bug with incorrect function name on uploads page
It appears that Form Order now includes implied tags in the Recent category. Before it didn't do that; it just included tags that were just inputted by hand and just those tags. Is this a new function or a bug?
It appears that Form Order now includes implied tags in the Recent category. Before it didn't do that; it just included tags that were just inputted by hand and just those tags. Is this a new function or a bug?
Sorry for the delay, I was waiting to try it out on an upload, and then got distracted. Anyways, I've tried it out recently, for instance on post #4377345 with the tag magazine cover, and it did not add the implication of cover to the list of recent tags.
What browser are you using? What version of the script are you using? Also, what are your script settings? The following are mine for reference, which I got by using the Cache editor on the right-hand side, selecting "Local storage" as a source, "user-settings" as the value, and then clicking the "Get" button.
Script version was 7.10. Data source is IndexedDB. I was using Waterfox Classic, but I'm gonna try again on the latest version of Firefox to make sure it isn't because I was using an old browser.
edit: Weird. The script actually slows down the tab to a halt after an upload. If I stop the process Firefox is warning me about (i.e. the script), the script doesn't work and the Recent tags reverts to the default.