Giter Club home page Giter Club logo

better-better-booru's Introduction

Better Better Booru

Various tweaks to make Danbooru better.


Links


Features

  • Allows the automatic control of the number of thumbnails per a page with a basic account or no account.
  • Endless pages support for various thumbnail listings with several customization options.
  • Multiple options and features for improved blacklist functionality:
    • Session toggle - Make individually disabled blacklist entries persist from page to page.
    • Post display - Change how blacklisted posts are hidden.
    • Thumbnail marking - Mark blacklisted thumbnails that have been unhidden so that they are easier to distinguish from other thumbnails.
    • Thumbnail controls - Allow control over the blacklist from a blacklisted thumbnail and allow for individual control of each blacklisted thumbnail.
    • Smart view - When viewing a blacklisted post, automatically display it if its thumbnail was already unhidden.
    • Additional bars - Add a blacklist bar to thumbnail sections without it so that blacklist entries can be toggled as needed.
    • Video playback - When viewing a blacklisted video post, control whether it pauses and plays based on its hidden status.
    • Ignore favorites - Exclude your favorited posts from being hidden.
    • Added support for wildcards (*), nesting/grouping, and additional metatags.
  • Multiple options and features for altering post viewing:
    • Alternate image swap - Swap between the sample and original image by clicking the image.
    • Resize image mode - Set the initial automatic resizing of an image to be by width, height, or both.
    • Image drag scrolling - Use click and drag on post content to reposition it.
    • Auto-scroll image - Automatically scroll the post content into view upon browsing a post.
    • Disable embedded notes - Force notes to display with the original style when viewing a post.
    • Video volume - Set the default volume of videos or remember your volume settings across videos.
    • Video autoplay - Choose whether videos automatically play.
    • Video looping - Choose whether videos automatically repeat by default.
    • Video controls - Choose whether video controls display by default.
    • Improved image resizing that works on flash content and also allows resizing by width, height, or both.
    • Improved ugoira functionality that includes note viewing on sample video versions, an additional "view sample" link for swapping from the original version, and support for swapping between the sample and original with Danbooru's hotkey.
  • Multiple options for altering the layout:
    • Remove tag headers - Remove the headers from the post sidebar tag lists and combine them into a single list sorted by type.
    • Tag scrollbars - Limit the length of the sidebar tag list(s) and use scrollbars when the list(s) exceed that limit.
    • Auto-hide sidebar - Hide the sidebar on the window's left side and display it when it gains focus or the mouse gets near it.
    • Fixed sidebar - Fix/stick the sidebar to the left side of the page and prevent it from vertically scrolling out of view.
    • Collapsible sidebar - Allow sections of the sidebar to be minimized and expanded.
    • Fixed paginator - Fix/stick the paginator to the bottom of the window and prevent it from scrolling out of view.
    • Hide favorite button - Remove the button below post content.
    • Add random link - Allow random post access from each post.
    • Add popular link - Allow easier popular post listing access from most post pages.
    • Various options for easily modifying status borders to your liking and creating your own secondary custom borders that match images based on your criteria.
    • Various options for customizing the majority of notices by either altering or hiding them.
  • Several other miscellaneous options:
    • Direct downloads - Let download managers download all the images currently displayed as thumbnails.
    • Track new posts - Create a specialized link focused on tracking and browsing new images.
    • Clean links - Remove extra information from post links in order to reduce history clutter/problems.
    • Post tag titles - Give posts a page title consisting of all of their tags.
    • Search add - Add/remove links to/from the sidebar tags that allow the easy inclusion or exclusion of additional search tags.
    • Page counter - Add an indicator near the top of listings that displays the page number information and allows for easy jumping to specific pages.
    • Comment scores - Make the score rating for comments visible.
    • Quick search - Filter the current thumbnails for specific posts that match your search.
  • Improved accessibility for logged out users via several options and features:
    • Control over the blacklist, post sample setting, post resizing setting, and tagged filenames setting.
    • Adds back missing options to the sidebar options section.
    • Re-enables post to post hotkey navigation for searches.

Installation

  1. Installing a userscript manager is strongly recommended and sometimes required. Suggestions:
  1. Open/install the script from a site or local computer file**. Please be sure you're using a trustworthy source. Recommendations:
  1. A prompt about allowing the installation should display.
  2. Choose to allow/install after reviewing your options.
  3. The script should now be installed and ready for use on Danbooru.
  4. To access script features, use the "BBB Settings" link in the Danbooru navigation bar.

** Note: If installing from a local file on your computer, your browser may require additional steps.

better-better-booru's People

Contributors

pseudonymous avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

better-better-booru's Issues

Resizing for screen

When this option is ticked under BBB settings, it does not resize vertically, only horizontally.

Reduce unnecessary API use

Much like how I've already made the comments section work, detecting if any thumbnails appear to be missing will cut down the listing API use. For posts with images that aren't hidden, API use might be avoidable by using the information provided in the page. This may be possible for some hidden posts as well.

I've had this in the "to do" list (bottom of this post) for quite some time.

Samples do not load

I've tried a multitude of different settings combinations, including overriding logged-in settings, but sample images just will not load properly.

When BBB is set to load sample images first, the sample does display for a split second, but then is replaced by the text, "Sample". Clicking the text loads the original image successfully. When BBB is set to load original images first or if the "view original" link is clicked, clicking the "view sample" link gives the error "Loading failed!" Disabling BBB causes samples to show normally.

sample
sample2

Any help with this? Samples are kind of nice to have. Thanks!

Hidden Tags broken

Some time ago, hidden tags stopped displaying for me. Sometimes the thumbnail will display but when I go to the full view I always get a "Better Better Booru: Due to a lack of provided information, this post cannot be viewed.". However, the readme still claims that bbb will display hidden tags. So, is it just me or is it broken for everyone?
I am using Chrome on Windows 8.1.

New hotkey for swapping between the sample and original image needs to be overridden

The hotkey is bound to "v" at the document level and it doesn't have a namespace. The only simple method of removing it with jQuery appears to be one that ends up unbinding all the jQuery keypress/hotkey events. If there's a better method that doesn't involve "hacky" tactics, I'm all ears. If not, I've found one method that requires me editing jQuery's internal data so I can give the keypress event responsible for the hotkey a namespace for specifically targeting it with unbind.

function removeDanbHotkey(key) {
    try {
        var jkd = $._data(document, "events").keydown;

        for (var i = jkd.length - 1; i >= 0; i--) {
            if (jkd[i].data.keys === key) {
                jkd[i].namespace = "diekey";
                $(document).unbind("keydown.diekey");
            }
        }
    }
    catch (error) {
        console.log("Hotkey removal error: " + error.message);
    }
}

Comments page needs to be handled

Allow script blacklist to alter it when logged out and display hidden post comments.

EDIT: I'm currently not aware of an API method to list the comments for a single post, so this is on hold while I figure it out.

Problems when trying to Preview image

Hmm where to begin...
I'm using "Imagus" its addon for Chrome that enables Preview the image of final page.
preview
Everything works fine only problem is when I try to preview any image taged as "Loli"and "Shota" it gets to infinite loop of loading.
preview2
Any other enabled tags by your script seems to work fine now :)

Clicking the image no longer resizes it?

It was a simple feature, but it was really convenient being able to just click the image to show the real-sized image. Now though, it doesn't work anymore. I tried finding the option in the script editor in wordpad in case it was just set to false, but couldn't find it.

If I'm not just being blind, could that feature get added back in?

Track New Posts doesn't work for regular users

With the current change over to the next/previous style paginator, the customized search for tracking new posts can no longer work since that style of paginator breaks any search that changes the default order of the posts. As is, the option will only be useful to gold+ members.

Still no convenient way to move from wiki page to search page

The function I use:

(function () {
  if (/\/wiki_pages\//.test(location.pathname)) {
    var postsElement = {}, currentTag = {}, theLink = {};
    postsElement = document.getElementById('wiki-page-posts').firstChild;
    currentTag = document.querySelector('.post-preview').firstChild.href.replace(/^.*tags=([^&]*)(?:$|&.*$)/,'$1') || document.getElementById('wiki-page-title').textContent.replace(/ /g, '_'); // Looks for the tag of the wiki page. try to get it in visible posts adresses or, else directly from the title.
    theLink = document.createElement('a');
    theLink.href = '/posts?tags=' + currentTag; // Generates the url
    theLink.textContent = postsElement.textContent; // "Posts"
    postsElement.textContent = ''; // Erease postElement HTMLcontent.
    postsElement.appendChild(theLink); // Done.
  }
})();

The link is put to the title of the post sample: [Post].

Icon overlay CSS needs to be adjusted

When the blacklisted overlay isn't being used, the animated/audio overlay is a little too far to the right. I think I've already found the right way to adjust it as needed via JavaScript, but I need to toy around with toggling various settings to be sure.

Script inconsistently fails to run

Sometimes the script just doesn't do anything. It's probably related to Danbooru's JavaScript being changed to asynchronous. It seems to happen when the the browser doesn't load Danbooru's JavaScript from the cache. I think I've already got a workaround using "document.readyState" and a "0ms" timer, but I'll have to put it to more of a test when done at work.

https for hidden posts

Hello again, sorry for despairing some time ago, didn't have more idea about saving location feature.

and about issue: simple question, why https is not working for 'hidden' posts?

Not Working Right Now

Hey!
So i just wanted to say, i love this Script, but! For some reason, right now, it is not working!
I'm using Better Better Booru - 7.2.5, on Tapermonkey 4.1.1.10, on Chrome Version 53.0.2785.116 m

I can, also, post SSs showing, that even with the BBB online, and enabled, the Option to open and configure the BBB (IF i remember corectly, it would be "BBB Options", near Wiki and Pools ) does not appear.
So, what, do you thing could it be? Is it really broken, or is it just me? Should i try with Firefox and Greasemonkey?

Edit: So, i can confirm, that the problem, is on Chrome. Just downlaoded Greasemonkey and Firefox, and it is indeed working over there, the problem, seens to be on Chrome and Tampermonkey.

Setting loli or shota to true removes the ?tags=taggoeshere part of links

It kinda breaks the navigation between images.
Any chance this could be fixed?

And yes, I have tried setting loli and shota to false without touching anything else to see if it is in fact loli\shota that causes the problem.
The ?tags=taggoeshere stays once I disable loli and shota.

Edit: It does sometimes work, and sometimes not.
Possibly related to whether there is a loli\shota image on the searchpage or not.

Provide an easy method for keeping track of new posts/images

Yaze in Issue #20 wrote:
What do you think about storing last seen image on danbooru pages?

eg 5 hours ago I checked main page for images (script stored id of last uploaded image to db), nothing interesting was here.. after hm... 4 hours I come back here, and start exploring... some post ahead there is mark on last seen image, so I know I seen those images, brilant idead dont you think?: )

Simple:
Open db posts - > Store id of last image
if(last_image_id > saved_last_image_id)
saved_last_image_id = last_image_id;

And simply show a blue,yellow,red whatever border around thumbnail.

Storage running out of space causes the script to completely fail

After I updated to 7.0 a few days ago, the script literally stopped doing anything. There is no "BBB Settings" link to begin with.

Things I already tried: restarting the browser, deleting and reinstalling the script, switching off all other danbooru-related scripts. None of that helped.

changing preferences requires manually editing the script

Not everyone should be expected to have to deal with that, and this means you have to edit the script every time it updates.

A good solution would be storing preferences using localStorage or something and injecting a menu into pages (or pretend to be part of the user settings page, even) to change stuff.

Ugoira support

The script currently works around ugoira posts, but full support should be added.

Not working

Script:
C:\Users\XXXXXX\AppData\Local\Temp\Rar$Dla0.345\better-better-booru.user.js
Line: 9502
Char: 2
Error: "document" is undefined
Code: 800A1391
Source: Microsoft JScript runtime error

I keep getting this error.. How do i run the script with Tampermonkey?

API access is currently throttled, what should I do?

I was browsing Danbooru as usual when a message saying: "Better Better Booru: Error retrieving information. Your Danbooru API access is currently throttled. Please try again later." suddenly showed up. What should I do to fix it?

Pools need to be handled

Currently waiting to see if a somewhat efficient API method for accessing a pool's ordered post information will show up. After that, allowing the script blacklist to affect it and displaying hidden posts are the goal.

Deleted comments in the comments section need to be handled

Posts that get one comment and then have that comment deleted take up space in the listing but get treated like hidden posts. The script currently doesn't have any way of dealing with these comments when trying to figure out whether the API info and page info match.

Suggestion: May can will be a Center Image option

When a picture is too wide is fabulous with the auto-hide sidebar option. But when is higher is the opposite, the auto-hide sidebar is annoying.

So I suggest if maybe you can code a Center Image option.

BBB causes the image to load twice

This is a problem I encountered only recently.

All default settings, tested in clean profile of Firefox and Chrome.

To repro:

  1. open any post link, like http://danbooru.donmai.us/posts/2648611
  2. You can clearly notice the image is loaded twice by flashing.

It can be seen in the network tool as well:

image

Notice that they have slightly different URLs (albeit the same image).

Disabling BBB immediately fixed the problem.

loli and shota images still not visible in the favorites

I favorited a number of images that were loli or shota because I knew better better booru would let me be able to find them in my favorites. While the main issue has been fixed, it seems that they're still not visible in your favorites.

Images of those 2 tags don't appear in the pools either.

If these issues are already known about and is still being fixed, sorry for the useless post.

And I didn't even think to check the obvious. Still not getting thumbnails either, I just get an "undefined" message.

Usage of localStorage

Hi,
Please use GM_setValue and GM_getValue for storing non-temporary data. For privacy, many users have the localStorage wiped after a restart.
Thanks

Video audio keeps playing/echoes

After the script removes the original video, the audio can keep playing (at least on Firefox).

This can produce:

  • An echoing effect (two unsynchronized audio track copies playing).
  • Audio that doesn't seem to pause (one "ghost" track playing after the new video pauses/stops).

Pausing the original, removing its source, and telling it to reload appears to fix this.

Userscripts.org replacement

I've been hoping, but I think it's best to abandon Userscripts.org. It doesn't look like any real effort is being made to fix it. Greasy Fork seems like the closest replacement and has made definite steps towards improvement since I first started keeping an eye on it. I'm already registered at it and two other possible replacements (http://monkeyguts.com/, http://openuserjs.org/). Just to reiterate... I see a good deal of promise in Greasy Fork due to the improvements I've seen over time, the fact that it's open source, and the level of activity in it. MonkeyGuts looks nice, but it seems slow in development and the user base feels like it's lacking. OpenUserJS just seems like it's lacking in features and almost feels like a "reskin" for GitHub.

I know the script could be GitHub only, but I feel having it on a script site designed for this type of thing is important for making it easy to find and getting it noticed. Actions like viewing the source, viewing version changes, and installing the script also tend to be more user friendly on those sorts of sites. I'm open to managing the replacement if that's desired.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.