Danbooru

[Feature Request] Highlight thumbnails of posts in favorites

Posted under Bugs & Features

Combined forum #131785 and forum #132077. Tested it and it works.

Posts and Comments
#c-posts .post-preview[data-is-favorited=true]:after,
#c-comments .post-preview[data-is-favorited=true] .preview:after {
    content: "+";
    position: absolute;
    width: 20px;
    height: 20px;
    color: white;
    font-weight: bold;
    background-color: rgba(0,0,0,0.5);
    margin: 2px;
    text-align: center;
    right: 0px;
    top: 0px;
}
#c-comments .post-preview[data-is-favorited=true] .preview {
    position: relative;
}

Replace content: with whatever you want (between the quotes).

If you don't care about the icon on the comment image previews, than just remove those portions.

Posts only
#c-posts .post-preview[data-is-favorited=true]:after {
    content: "+";
    position: absolute;
    width: 20px;
    height: 20px;
    color: white;
    font-weight: bold;
    background-color: rgba(0,0,0,0.5);
    margin: 2px;
    text-align: center;
    right: 0px;
    top: 0px;
}

Thanks, BrokenEagle, looks like this works nicely. One thing I found myself wishing it would do, which I don't think is possible with pure CSS, is to not show the mark when searching one's own favorites: in that case, I already know they're all favorited, so I don't want a checkmark on everything. So I made a little UserScript that adds your CSS unless the URL contains fav:username (change usernamegoeshere in the exclude line to your own username). Tested in Chrome and Firefox.

// ==UserScript==
// @name			danbooru add checkmark to own favorites when browsing, but not when viewing or searching own favorites
// @match        *://*.donmai.us/*
// @exclude        *://*.donmai.us/*fav%3Ausernamegoeshere*
// @grant			GM_addStyle
// @run-at          document-start
// @description  add checkmark to own favorites when browsing, but not when viewing or searching own favorites
// ==/UserScript==

(function(){
'use strict';
    GM_addStyle ("#c-posts .post-preview[data-is-favorited=true]:after, #c-comments .post-preview[data-is-favorited=true] .preview:after { content: \"✓\" !important; position: absolute !important; width: 20px !important; height: 20px !important; color: white !important; font-weight: bold !important; background-color: rgba(0,0,0,0.5) !important; margin: 2px !important; text-align: center !important; right: 0px !important; top: 0px !important; } #c-comments .post-preview[data-is-favorited=true] .preview { position: relative !important; } ");
})();
1