Userscripts / Customization

Ecstatis

@Sollace
@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
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
Best Artist - Providing quality, Derpibooru-exclusive artwork
A Really Classy Artist - 250+ images under their artist tag
Magical Inkwell - Wrote MLP fanfiction consisting of at least around 1.5k words, and has a verified link to the platform of their choice
Not a Llama - Happy April Fools Day!
An Artist Who Rocks - 100+ images under their artist tag
Artist - sollace

Really likes Pear Butter
@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.
Interested in advertising on Derpibooru? Click here for information!
Travelling Pony Museum

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

Syntax quick reference: *bold* _italic_ [spoiler]hide text[/spoiler] @code@ +underline+ -strike- ^sup^ ~sub~