Nobody’s perfect, that’s especially true when it comes to tagging. This script is for those times when you need to apply the same tag changes across a set of images, whether to refine the tags or fix mistakes. Because while adding one or two tags in bulk might be easy if you’re well versed in the keyboard shortcuts, removing existing tags is much more time consuming, requiring you to find and remove it via mouse click.
With the script installed, you can define a set of tags that can be added and removed in the editor with a single click. Or making edits directly from the search page.
Works with Violentmonkey or Tampermonkey
Works with Tampermonkey.
Works partially with Violentmonkey by installing alternate script version, with the limitation that the saved tags does not carry over across different domains.
Primary: Click here to install from Github
Firefox Violentmonkey: Click here to install
data-image-tag-aliases” field. To get a resolved collection of tags, it looks like the options are parsing the child
title” field for the text following “
Tagged:”, or getting the tags list from an additional call to the images API, or using the field “
data-image-tags” and converting tag IDs to tag names via additional API calls (in order of what I suspect is easiest/preferable)
title” field and its format,
const tags = deserializeTags\(imageContainer.dataset.imageTagAliases\);
const tags = deserializeTags\($\('a', imageContainer\).getAttribute\('title'\).split\(/\\\| .+?: \(.+\)/\)\[1\]\);
imageContainer.dataset.imageTagAliases = serializeTags\(tags\);[see footnote]
const newTitle = $\('a', imageContainer\).getAttribute\('title'\).split\(/\^\(.+? \\\| .+?: \).+/\)\[1\] + serializeTags\(newTags\);
$\('a', imageContainer\).setAttribute\('title', newTitle\);
$\('img', imageContainer\).setAttribute\('alt', newTitle\);
imageContainer.dataset.imageTagAliases = serializeTags\(tags\);
imageContainer.dataset.imageTagAliases = serializeTags\(newTags\);
titleattribute, and easier to maintain compatibility with Twibooru.
getTagsFromId. Would one of the other lines, like if “image” or “post” objects are absent from the response, throw an error to catch? That’s getting out of my depth as an amateur. Is there any chance this could lead to inadvertently blanking an image’s tags? I guess that would be rejected for not having a required tag such as a rating. Or maybe, that’s why the POST data takes old tags as well as new tags, to take the difference on the server side…
imageContainer, in order to update the
altso the tooltip reflects the changes without reloading the page, but that gets back into parsing and is just a nicety.
even if it’s (a tiny bit) more network traffic
what the script would do in case the fetch of the image API has a non-promise-rejecting error
.then(resp => resp.json())when it tries to parse the response. I know that querying a deleted image will get back a json response, but it’s unlikely that those images will be reachable from the search page.
in order to update the title and alt […] but that gets back into parsing and is just a nicety
95.0.4638.69 (Official Build) (64-bit).
1.1.1from the primary install link in the OP.
Everythingfilter enabled, I click ‘Tag Edit’ in top right corner, add “
oc name needed” to the ‘Tags to add’ and click ‘Apply’. It immediately says ‘Completed’ below the ‘Tags to add’ box, and redoing the search after 5mins and clicking any of the results shows the change wasn’t made.
C:\Users\REDACTED\AppData\Local\Google\Chrome\User Data\even after enabling ‘Collect errors’ for Tampermonkey in Chrome extension settings and setting Tampermonkey’s own logging as
Debugin its settings, which ain’t helped by Tampermonkey’s own docs being 1 of the most useless I’ve seen, if I didn’t miss anything.
https://derpibooru.org/search?q=artist%3Amochii-maddness%2Csource_url%3Ahttps%3A%2F%2Fwww.deviantart.com%2Fmochii-maddness, simply nothing happens way or another, it’s like I never clicked the button.
98.0.4758.102 (Official Build) (64-bit)
// @inject-into pagecuz it puts a yellow triangle next to the 1st slash in that line and says:
eslint: userscripts/no-invalid-headers - '@inject-into' is not a valid userscript header
Derpibooru costs over $25 a day to operate - help support us financially!