Here are a few scripts i made both for fun and to practice coding.
Danbooru 2 Tweaks & Features (Main script):
Direct link: https://raw.githubusercontent.com/Lightforger/danbooru-userscript/...
Github: https://github.com/Lightforger/danbooru-userscript/
Install guide:
(*)Firefox: Download the script somewhere (open direct link, Ctrl+S) and drag the script file into firefox, must have greasemonkey addon installed.
(*)Opera: Download, go to Opera Options > tools > Preferences > Advanced > Content > JavaScript options. Select the directory from where you want the scripts to run (any directory with *only* scripts). Optional: change it from '.user.js' to '.js' for faster response times. Opera-only feature.
(*)Chrome: Download, go to the address "chrome://extensions" and drag the script file onto the page.
A few images showing off the main features ~ Custom style is enabled in all images:
Endless pages (zoomed out)
Settings menu
Pool reading mode (zoomed out)
Current features:
Endless pages
Major feature, as seen in the pictures, just scroll down and more images get added to the page.
*Hard limit of 1000 pages
Custom style
Major feature, compresses a lot of blank space on the page.
Pool browsing/reading mode
Major feature, adds a 'browse' button to pools which allows you to easily read series without having to constantly click 'next' or open 100 tabs (image) .
Note, only limited editing is possible on dynamically generated pages, post if you want a specific tool/option to be added.
Clicking the image to hide notes works, and a shift-click has been added to show/hide the translation boxes.
Vote link confirmation
Vote up/down links are now placed behind a "show votes" button, to avoid mis- or accidental clicks.
Freely Move pool navigation
Adds a setting and a button to move the pools bar either above or below the image at the click of a button.
GUI setting
Settings menu - no longer required to browse folders or edit files to change your settings.
Quickswitch blacklist (default: disabled)
Adds a button to toggle an additional set of blacklisted tags. Includes content on the current page.
Default use: SFW mode, hides all explicit/questionable content.
Shift+click to edit the blacklist.
Requests
Feel free to post any requests/suggestions for features, tweaks or changes within the script.
Manual editing of settings
While this is no longer needed due to the settings menu found at the 'my account' page, you can still edit the settings this way if you prefer. (be sure to read the comments above the settings)
(*)Firefox: Tools > Greasemonkey > Manage User Scripts, "options" on the script > Edit this User Script (select notepad, notepad++ or any other text exitor).
(*)Opera: Go to your userscripts folder, rightclick, open with any text editor
(*)Chrome: A bit more complicated, the script is saved in C:\Users\XXXXXX\appdata\Local\Google\Chrome\User Data\Default\Extensions\xxxxxxxxxxxxxxxxxxxxx\1.0.x_0 , edit the "script.js" with any text editor.
-Planned features-
*See 'to-do/idea list:' at the bottom of the script - changes almost every version.
-Known issues-
*The "show all comments" also unhides all vote up/down links.
*Very old browsers, like firefox 3/4 might be not supported.
*The "show blacklisted images" links do not affect images added by endless pages.
*
Simple scripts:
Unless otherwise noted, these scripts work best as a bookmark, just Ctrl+A from pastebin, paste in the "target" or "link" field of a bookmark, or paste in the address bar. These scripts usually are pretty easy to edit as well, if you have trouble reading the code, just run it through a site like http://jsbeautifier.org/
Visual display of translation status:
http://pastebin.com/raw.php?i=1WjebENc
Upon running the script at any page with image thumbnails (pool/search/popular/etc), it will mark them with a colored border depending on their tags, this should be handy for checking if you tagged an entire pool correctly, finding content to translate or just to check tags.
Dotted red border = 'partially_translated'
Solid red border = 'translation_request' or 'commentary_request'
Dotted Green border = check_translation + either 'translated' or 'commentary'
Solid Green border = 'translated' or 'commentary'
None of the above = No border
*followed kounishin's idea to put borders a level higher.
1-click mark translated:
http://pastebin.com/raw.php?i=aRqtGPEt
Simple script, if on a image page, replaces "translation_request" with "translated", removes "partially_translated" and submits. Code's behind it is a little wonky, but works for now. Best place it somewhere you won't accidentally click :P
Copy notes:
http://pastebin.com/raw.php?i=6jV8Lptp
Not-so-simple script, it must be used as a bookmark, as most browsers cut off text in the adress bar after ~4000 characters.
Mainly used for easily copying notes from pixiv templates, or parent/child posts.
Supports scaling up dimensions of notes based on image size, can copy notes 1-by-1 or all notes at once. Everything should be pretty obvious from the menu that comes up.
Changelog:
2014-07-03 - v1.0.12:
- removed leftover bit of old code
- endlesspages no longer loads in background when viewing wiki page.
2014-06-28 - v1.0.11:
- Updated to new danbooru version
- Images added by Endlesspages now also support more than 1 color border at a time
- Fixed thumbnails not displaying for endless pages
- Fixed thumbnails that sometimes didn't align properly
- Fixed 'Vote up' still displaying when 'Hide vote buttons' tweak is on
- Switched to github as userscripts.org seems to be going down
2013-04-18 - v1.0.10:
- Updated css
2013-04-18 - v1.0.9:
- Mainly just keeping up with danbooru updates
- Added some basic edit tools for pool browsing mode
- Finished Quickswitch blacklist
2013-03-25 - v1.0.8:
- Bugfix
2013-03-18 - v1.0.7:
- Added Quickswitch blacklist
- Updated css
- Fixed endless pages not activating on homepage.
2013-03-18 - v1.0.6d:
- Small CSS/script adjustments to work with new danbooru layout.
2013-03-18 - v1.0.6b:
- Remove the 'disable hotkeys' feature
- Fix a conflict with at least 1 other userscript
- Big CSS update
2013-03-12 - v1.0.5:
- Fixed note position when browsing at reduced image size (samples)
- Fixed the 'click image to hide notes' feature to browsing mode
- Added a 'Shift click image to show all note translations' feature to browsing mode
- Improved performance of browsing mode.
- Blacklist works on browsing mode now. Note, the script only displays the first blacklisted tag it finds.
2013-03-08 - v1.0.4:
- Added pool browsing mode (aka series reading mode) - major feature
- Updated pool-related code to go along with danbooru update
2013-03-07 - v1.0.3:
- Added settings menu
- Added pool quickswap button
- Cleared some outdated css
2013-03-02 - v1.0.2:
- Added a new paginator for endless pages.
- endless pages on pools now works a lot faster & less bugs.
- few minor bugfixes.
2013-02-28 - v1.0.1:
- Added 'Move pool navigation to top' feature
- Added 'Disable hotkeys' feature
- minor improvements in stylesheet
2013-02-28 - v1.0.0:
- initial release
- merged userscript and stylesheet
Updated