0

I am using the stylish extension to modify the looks of a website (it is allowed via their terms) and one of things I need to modify is their bodies of text, here is an example:

 <p>Lorem ipsum dolor sit amet, consectetur a.</p>
  <p>2</p>
  <p>Maecenas vitae fermentum quam, in sollicitudin velit. Sed convallis metus a ante efficitur fringilla. Suspendisse donsequat mi, nec efficitur libero.</p>
  <p>5</p>
  <p>Phasellus bibendum pellentesque enim.</p>
  <p>8</p>
  <p>Nam viverra leo vel massa euate.</p>
  <p>3</p>
  <p>Quisque vel elit at.</p>
  <p>6</p>

What I want to do is using these stylish extension to render numbers between 1-99 as transparent, or better yet block/display: none for that specific line. I don't want to remove numbers entirely, but solely remove the lines that only have numbers on it.

Is there a method using CSS to achieve this? I have no control over the site, I just want to make my browsing experience better and remove these odd numbers that keep appearing but serve no purpose.

Temani Afif
  • 245,468
  • 26
  • 309
  • 415
  • 2
    Is this for a specific website, or for general/multiple websites? And is the markup always in this order (e.g. OK content, bad content, OK content, bad content, alternating forever)? If you know the markup ahead of time, you can usually manage something passable with CSS... certainly in the case of your sample HTML. However, this is fragile/hacky because you're relying on the site to never change its markup structure (something website developers love to do _all the time_). – TylerH Apr 19 '23 at 21:54
  • @TylerH the site changes quite a lot and its not in this order, sometimes it goes 5 or 6 lines before a number appears, sometimes its every other line like the example. The numbers are random as well. – Alexander Gremory Apr 19 '23 at 22:12

0 Answers0