I'm using Firefox web browser which has an add-on that lets you override whatever style you want.So my goal is to use that add-on to hide the scroll bar in the right side of the screen.There are two situations:1) The page doesn't require the scroll bar.2) The page has a scroll bar, and I want to hide it. I'm currenly using this script to hide the scroll bar, however this script works well when the page has a scroll bar.When the page doesn't have a scroll bar, the script rips off 16 pixels from the page (the default width of the scroll bar) Here's the script:
/* hide vertical scrollbar */notificationbox { overflow-x: hidden;}browser[type="content-primary"], browser[type="content-targetable"] { overflow-y: scroll; margin-right: -16px; /* cut off 16 pixels no matter what*/}
Do you guys have any idea how should i check:If the page doesn't have the scroll bar, do not run the code, but if it has it, run it! Thanks in advance!