Userscripts / Customization

Ecstatis

@Ecstatis
For ViolentMonkey you have to use:
// @inject-into content
// @grant none
And create your stylesheet like this:
const element = document.createElement(‘STYLE’);
element.setAttribute(‘type’, ‘text/css’);
element.innerHTML = `
.comment_box_flex {
display: flex;
}`;
document.body.insertAdjacentElement(‘afterend’, element);
 
Yeah I’ve seen that in your post above already, my only gripe with that though is that it would make dynamically adding and removing rules (as I already mentioned that I need) quite cumbersome. Well I guess I could just store the rules and update the style HTML on every change instead, although I’m not quite confident that this will work properly.
 
EDIT: Oh well nevermind, it works just fine now. Thank you :)
Sollace
Lunar Champion - Led the charge of major battles for the New Lunar Republic, bringing swift and crushing defeat to the forces of the Solar Empire (April Fools 2023).
Elements of Harmony - Had an OC in the 2022 Community Collab
Non-Fungible Trixie -
Verified Pegasus - Show us your gorgeous wings!
Preenhub - We all know what you were up to this evening~
My Little Pony - 1992 Edition
Notoriously Divine Tagger - Consistently uploads images above and beyond the minimum tag requirements. And/or additionally, bringing over the original description from the source if the image has one. Does NOT apply to the uploader adding several to a dozen tags after originally uploading with minimum to bare tagging.
A Really Hyper Artist - 500+ images under their artist tag
Wallet After Summer Sale -
Friendship, Art, and Magic (2019) - Celebrated Derpibooru's seventh year anniversary with friends

I am the night!
@Ecstatis  
I thought of that as well.
 
Simple solution is to put the css you want to change into a separate style element and give it an id. Then either replace the contents (I’m not sure if that will cause problems with CSP) or remove and re-add the element.
 
Strangely, I think the inline styling my script applies directly to elements is also excempt from CSP controls. Either that or it’s just not required. full
Background Pony #4C7A
So I’ve gotten a little tired of doing this little dance…
…whenever I’m trying to click on a tag in the middle of the tag soup, here’s a dirty, hacky way of adding half a second of delay to the dropdown using CSS:
Same here, except I wrote it as:
.tag.dropdown>.dropdown__content { display: block; min-width: 100%; z-index: 999;
	visibility: hidden; transition-delay: 0.25s; }
.tag.dropdown:hover>.dropdown__content { visibility: visible; transition: 0s 1s visibility; }

Is there a Userscript to change the Voteicons back to Votepones?
Interested in advertising on Derpibooru? Click here for information!
Sky Railroad Merch Shop!

Derpibooru costs over $25 a day to operate - help support us financially!

Syntax quick reference: **bold** *italic* ||hide text|| `code` __underline__ ~~strike~~ ^sup^ %sub%

Detailed syntax guide