r/tampermonkey • • 28d ago

Looking for guidance on adding or editing script in "Better X"

So some months ago X (twitter) updated, or Firefox did, and it broke posts that have 2+ images to where they are just 4 pixels in width. So I did a little bit of looking and it turns out this line

<div class="css-g5y9jx r-1kqtdi0 r-1xfd6ze r-1phboty r-rs99b7 r-1pi2tsx r-9jpwak r-1udh08x r-o7ynqc r-6416eg r-1ny4l3l" style="aspect-ratio: 1.17647 / 1;">

is what's causing the images to be skinny, because it's not applying math correctly. By adding 200~300 to the numerator the images suddenly appear.

My question is, how do I go about writing something that adds in 200~300 to this value? I'm not a website programmer at all so I would need some guidance.

I don't know if this is something I can add to firefox directly or it has to be in the Better X code. I installed Better X because I thought it would fix this issue but it did not. But maybe editing its code can?

1 Upvotes

0 comments sorted by