Danbooru

[Userscript/Prototype] SiteTagSearches

Posted under General

SiteTagSearches adds more site links besides Pixiv for the translated tags that show up on a wiki page.

Installation

Project page
Main script

https://raw.githubusercontent.com/BrokenEagle/JavaScripts/stable/sitetagsearches.user.js

Usage notes

It removes the links from the tags themselves. Instead, it presents a triangle at the end of the tag. Clicking that will open up a note window below with links for several different sites. Clicking it again will close that note window. The first tag will be the tag itself, and in addition to the triangle on the right, it also has one on the left which will open links to search for that tag on different Booru sites.

Supported sites

Shown in the order as used in the note window.

Image sites
  • Pixiv
  • Seiga
  • Nijie
  • Tinami
  • BCY.net
  • Deviantart
  • Artstation
  • Tumblr
  • Twitter
  • E-Hentai
Booru sites
  • Gelbooru
  • Yandere
  • Sankaku
  • Konachan

Final

The end goal would be have something to submit for issue #3503. This particular version uses the suggested format from @SD-DAken.

Any suggestions or feedback is appreciated.

Latest edits

  • (2020-03-01)
    • Version 4 - Complete rewrite

Versions

Show
  • (2018-02-03)
    • Version 2 - Initial release
  • (2018-02-04)
    • Version 3
      • Added tag name to list of other tags
      • Added booru sites for this tag name
  • (2018-02-05)
    • Updated this OP
      • Added the Booru supported sites for Version 3
      • Added usage notes for opening the Booru note window.
  • (2020-03-01)
    • Version 4 - Complete rewrite

Updated

Pushed Version 3, based on a recommendation from evazion to add the actual tag name to the list of tags, as well as adding links to the other booru sites. This appears as the first tag in the tag list, and the list of other boorus will toggle when clicking the triangle to the left of that tag, whereas the one to the right will trigger the image sites as normal.

  • Minor versions
  • (2018-02-05)
    • 3.1 Fixed tag link not showing up when no translated tag exists

Updated

Pushed Version 4 which involved a complete rewrite of the code, along with a few additions, changes and fixes.

  • Additions
    • There is now a settings menu for the script
      • (My Account >> Settings >> Userscript Menus) under SiteTagSearches
      • The sites being included in the dropdown list can be selected here
      • If no sites are selected for a particular type (source, booru), then the toggle doesn't get rendered for that type
  • Changes
    • Clicking a link now opens a new tab instead of following the link
    • Removed BYC.net from the list of available sites
      • Their tag search function no longer works in a way which the script can support anymore
    • Updated the site search URLs as required
  • Fixes
    • Fixed wrong text selected for the main tag on post search queries
    • Fixed several issues with the stylings causing issues with the drop-down menus
  • Other
    • Multiple internal code changes and refactors

Was Nijie intentionally removed from this? I just added it back in myself, and after realizing I needed to "factory reset" the script to get my changes to work, thought to check here. I see from GitHub that it appears to have disappeared in version 4.1?

The diff from TamperMonkey and my tweaks just now if I attempt a reload from the official is below:

Show
===================================================================
--- Current Version
+++ New Version
@@ -48,9 +48,9 @@
 const STS = {};
 
 //Available setting values
 const BOORU_SITES = ['gelbooru', 'yandere', 'sankaku', 'konachan'];
-const SOURCE_SITES = ['pixiv', 'nicoseiga', 'twitter', 'deviantart', 'tumblr', 'artstation', 'E-Hentai', 'tinami', 'nijie'];
+const SOURCE_SITES = ['pixiv', 'nicoseiga', 'twitter', 'deviantart', 'tumblr', 'artstation', 'E-Hentai', 'tinami'];
 
 //Main settings
 const SETTINGS_CONFIG = {
     booru_sites_enabled: {
@@ -148,11 +148,8 @@
     },
     'E-Hentai': {
         url: 'https://e-hentai.org/?f_search=%s',
     },
-    nijie: {
-        url: 'https://nijie.info/search.php?word=%s',
-    },
     gelbooru: {
         url: 'https://gelbooru.com/index.php?page=post&s=list&tags=%s',
     },
     yandere: {

Updated

Shinjidude said:

Was Nijie intentionally removed from this? I just added it back in myself, and after realizing I needed to "factory reset" the script to get my changes to work, thought to check here. I see from GitHub that it appears to have disappeared in version 4.1?

Thanks for the heads up. It was mistakenly removed during a previous complete rewrite of the code. I have just restored it with Version 4.6.

1