Similar to forum #321493, but for webp. Displays whether webp image uses lossy or lossless format. Also estimates quality, but this shouldn't be relied on for most real-world webps. Shows the info on media asset and upload pages.
Probably not the right thread to ask this but I used to have a bookmarklet that would grab pixiv/bsky/twitter user IDs. I lost it when upgrading to a new version of Firefox and can't find it anymore. Is this one still around or does an userscript port of it exist?. Would love to have it again.
Probably not the right thread to ask this but I used to have a bookmarklet that would grab pixiv/bsky/twitter user IDs. I lost it when upgrading to a new version of Firefox and can't find it anymore. Is this one still around or does an userscript port of it exist?. Would love to have it again.
This one generally works. Copy the text starting from javascript:
I had plans for writing something like this for a bit but was a bit lazy. I saw UnderCurve metion it on discord so I threw something together. I don't see any glaring issues with the brief use so far so I thought I'd share it.
The script checks the artist of an upload for deleted posts/ai tagged art and presents a color accordingly.
Inspired by the like vibration on Twitter mobile site.
Trigger vibration on supported devices when voting or favoriting. This script does not work in browsers that do not support the vibration API (e.g. Firefox).
Snippet to quickly edit banned posts. Requires the corresponding asset to be in your uploads. Put in the browser console on any danbooru page, edit constants on top, execute.
Show
(async () => {
// ID of the post to change
const POST_ID = 1;
// New additional tags/metatags (rating:, parent:, etc.)
// `source:`, `-` (removing tags), some other metatags are not accepted
const NEW_TAGS = ``;
// ---------------------------------------------------------------------------
const uploads = await $.get("/uploads.json", {
only: "id,upload_media_assets[id,media_asset_id]",
"search[upload_media_assets][post][id]": POST_ID,
});
const upload = uploads[0];
if (upload === undefined) {
throw new Error("No upload found");
}
const post = await $.get(`/posts/${POST_ID}.json`, {
only: "id,media_asset[id],rating,parent_id",
});
const upload_media_asset = upload.upload_media_assets.filter(
(uma) => uma.media_asset_id === post.media_asset.id
)[0];
await $.post("/posts.json", {
upload_media_asset_id: upload_media_asset.id,
post: {
tag_string: NEW_TAGS,
rating: post.rating,
parent_id: post.parent_id,
},
});
window.location = `/post_versions?search[post_id]=${POST_ID}`;
})();
Is there a script or method for highlighting non existent tags on upload to filter out typos and what not?
I tried messing around with this tag by @hdk5, by changing the (hard to see) dotted line to the color of the artist tag (I didn't actually care much for category highlighting I just wanted to filter out typos)
hdk5 said:
Input Tag Highlight
Adds highlighting to the post create/edit tag input field. Highlights normal tags by category, crosses deprecated tags, underlines empty tags, highlights metatags name:"value".
(May be a bit janky, but is confirmed to work properly on desktop Firefox and desktop Edge.)
... but I am not actually a programmer and couldnt get it to work, though I could get the strikethrough to work.
There's also this by @BrokenEagle98 but it requires manually clicking the check button which is annoying and the above prooves "automatically" checking tags is possible.
BrokenEagle98 said:
ValidateTagInput checks all tag adds and removals on a post edit. For tag adds it validates that no new tags are being created via mistaggings or mispellings. For tag removes it checks the implication hierarchy to validate that no existing tags will readd that tag once it is removed.
There are two buttons: Submit and Check. Both will perform tag validation, but only submit will go on to submit the tags.
If one of the validations fail, it presents an error notice. For tag adds, it lists all of the new tags that will be created. For tag removes, it lists all of the hierarchy relationships that will cause a tag removal to be readded.
Additionally, it will display a Skip Validation checkbox below the Submit button. Selecting this will cause the userscript to ignore any validation failures and submit the tag changes as is.
One way to cause the tag validator to ignore a particular tag, especially if it is intentional, is to preface it with the metatag for its character type (example: general:this_is_a_new_tag).
Final
Any suggestions or feedback is appreciated.
Latest edits
(2022-09-04) Updated script link in OP
Versions
Show
(2017-09-24)
Version 2 - Initial release
Version 3 - Removed tagtype tags as a consideration for tag add validation <kittey: forum #136421>
(2017-09-25)
Version 4 - Added support for uploads page
Version 5 - Added remove tag validator
(2017-09-26)
Version 6
Added alias check to add tag validator
Normalize tags to lowercase <nonamethanks: forum #136522>
Version 7
Fixed a bug in data model, causing the submit process to hang
Restyled the warning messages
Saves all alias results regardless if an alias is found or not
(2017-09-27)
Version 8 - Rebound return key to use tag validator
(2017-09-28)
Version 9 - Fixed bug with final tag list calculation <nonamethanks: forum #136678>
(2017-09-29)
Version 10 - Negative tags can now be used to fix a prior mistake <nonamethanks: forum #136752>
Version 11 - Fixed bug with uploads page involving pre-edit tags <nonamethanks: Discord>
(2017-09-30)
Version 12 - Fixed timing bug with script <Unbreakable: forum #136728>
(2017-10-08)
Version 13 - Added check rating exists validator
(2017-10-10)
Version 14 - Changed data model and added data model validator
(2017-10-13)
Version 15 - Added tag validation to quick edit mode
(2017-10-16)
Version 16 - Added reset cached data link to user settings
(2017-10-21)
Version 17 - Migrated to IndexedDB for data storage
Uses Session Storage to mitigate DB penalty
Local Storage is used as a fallback for IndexedDB
It now gets pruned when it reaches a certain size
Fixed issue with quoted source metatag
(2017-10-22)
Version 18 - Made debug info conditional
Bug fix with pruning function
(2017-11-13)
Version 19 - Accounted for new Meta tag category (ref topic #14678)
(2017-11-18)
Version 20
Bug fix with data model check
Rating validator now checks for the rating in the tag box
(2017-11-19)
Version 21 - Bug fix on post index page for Member/Anonymous <evazion: Discord>
(2017-11-21)
Version 22 - Removed rating exists validator (issue #3362)
(2018-01-13)
Version 23 - Full validation of client data
(2018-06-04)
Version 24
Updated to use library
Major code refactor
Add a button that just checks instead of submitting
It also includes the ability to autocorrect some common typos. It mostly works (I use it for all my uploading), but beware that there's like one or two tags out there that autocorrect into something incorrect, and I didn't add an override so you have to temporarily disable the script if you come across those. I've come across those tags like 2 times since I've made it, so it's probably fine.
I am actually currently rewriting it into something more maintainable, but this older one remains functional.
It also includes the ability to autocorrect some common typos. It mostly works (I use it for all my uploading), but beware that there's like one or two tags out there that autocorrect into something incorrect, and I didn't add an override so you have to temporarily disable the script if you come across those. I've come across those tags like 2 times since I've made it, so it's probably fine.
I am actually currently rewriting it into something more maintainable, but this older one remains functional.
Thanks.
Is it possible to set up those "typo" auto corrections yourself? Though it is a different booru I'm also familiar with the re621 script for e621 which is a huge scrip that, among many other things, allows users to set up their own "aliases" and is insanely good. But it is cumbersome constantly copypasting between hydrus, then e621 then danbo when uploading. For uploading between sites I have it set to auto correct a bunch of tags not used on danbooru to "bangs" which is deprecated and alias tags to their danbooru equilivant. For example:
I tried asking the creator once about compatibility with other sites but the aliasing is just one fraction of what it does (and I can see in github it relies on a ton of e6 libraries) and the creator apperently is almost too busy to maintain it for e6 let alone port to danbo.
Is it possible to set up those "typo" auto corrections yourself? Though it is a different booru I'm also familiar with the re621 script for e621 which is a huge scrip that, among many other things, allows users to set up their own "aliases" and is insanely good. But it is cumbersome constantly copypasting between hydrus, then e621 then danbo when uploading. For uploading between sites I have it set to auto correct a bunch of tags not used on danbooru to "bangs" which is deprecated and alias tags to their danbooru equilivant. For example:
I tried asking the creator once about compatibility with other sites but the aliasing is just one fraction of what it does (and I can see in github it relies on a ton of e6 libraries) and the creator apperently is almost too busy to maintain it for e6 let alone port to danbo.
There's a menu item in the userscript manager's menu (for ViolentMonkey this involves clicking on the extension icon). It also should work fine, although I haven't extactly tested it extensively, but it worked for me. You can edit the default dictionary with it, and it allows for regex and textual replacements, and you could use it for custom aliases too. It also supports JSON import and export (the format should be pretty self-explanatory).
There's also this by BrokenEagle98 but it requires manually clicking the check button which is annoying and the above prooves "automatically" checking tags is possible.
You don't have to click the "Check" button by the way. It also does the checking once you click the "Submit" button or doing a Ctrl+Enter. The "Check" button is provided so that one can do a validation during the progress of tagging and not waiting until the very end.
I tried messing around with this tag by @hdk5, by changing the (hard to see) dotted line to the color of the artist tag (I didn't actually care much for category highlighting I just wanted to filter out typos)
I intentionally did not use a separate color for empty tags, but also made them easy to decorate with user-styles, e.g.:
There's a menu item in the userscript manager's menu (for ViolentMonkey this involves clicking on the extension icon). It also should work fine, although I haven't extactly tested it extensively, but it worked for me. You can edit the default dictionary with it, and it allows for regex and textual replacements, and you could use it for custom aliases too. It also supports JSON import and export (the format should be pretty self-explanatory).
I tried but it dosen't seem to work.
hdk5 said:
I intentionally did not use a separate color for empty tags, but also made them easy to decorate with user-styles, e.g.:
You don't have to click the "Check" button by the way. It also does the checking once you click the "Submit" button or doing a Ctrl+Enter. The "Check" button is provided so that one can do a validation during the progress of tagging and not waiting until the very end.
There's no way to just make it work as you type? Like the above.