kimabrandt / yarip

Yet Another Remove It Permanently
GNU General Public License v3.0
16 stars 3 forks source link

Fix for disappaering scroll bar #6

Open imtao2 opened 7 years ago

imtao2 commented 7 years ago

This is more a feature request than a bug, but I couldn't find a better place to post. Lots of sites use a DHTML "popup" with a dimmed page to solicit their mailing list, a sale, a site survey, etc., and YARIP works great to kill these. Unfortunately, many sites simultaneously remove the vertical scroll bar, leaving the resulting page awkward to navigate. I am curious if there is a way for YARIP to force the scroll bar, and in these situations add to the page instead of subtract? There are thousands of examples, but for one, I was browsing http://www.hhgregg.com this morning, which seemed particularly obnoxious.

kimabrandt commented 7 years ago

Yarip can inject CSS into the page. If you already created the page (in yarip), then try to right-click on the page and then Yarip > Manage pages.... Otherwhise try to right-click on the page and then Yarip > Create page.... The Page-manager should open, where you go to the Page- and then Style-tab. Click Add, where you could change the XPath to /html/body, but it should work with /html/head, as long as the site is not using !important themselves. Then change the text-box to the following:

html {
    overflow: -moz-scrollbars-vertical !important;
}

Hope this helps.

kimabrandt commented 7 years ago

I just saw that you shouldn't be using -moz-scrollbars-vertical, but instead use overflow-x and overflow-y. Try the following:

html {
    overflow-x: auto !important;
    overflow-y: auto !important;
}
imtao2 commented 7 years ago
Thanks, they both work!  I already had a hunch that I hadn't scratched the surface of YARIP, but now I know for sure. :)Todd-----Original Message----- From: "Kim A. Brandt" Sent: Jan 19, 2017 2:36 AM To: kimabrandt/yarip Cc: imtao2 , Author Subject: Re: [kimabrandt/yarip] Fix for disappaering scroll bar (#6) I just saw that you shouldn't be using -moz-scrollbars-vertical, but instead use overflow-x and overflow-y. Try the following: html { overflow-x: auto !important; overflow-y: auto !important; } —You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread. {"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kimabrandt/yarip","title":"kimabrandt/yarip","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kimabrandt/yarip"}},"updates":{"snippets":[{"icon":"PERSON","message":"@kimabrandt in #6: I just saw that you [shouldn't be using `-moz-scrollbars-vertical`](https://developer.mozilla.org/en-US/docs/Web/CSS/overflow#Mozilla_Extensions), but instead use `overflow-x` and `overflow-y`. Try the following:\r\n\r\n```\r\nhtml {\r\n overflow-x: auto !important;\r\n overflow-y: auto !important;\r\n}\r\n```"}],"action":{"name":"View Issue","url":"https://github.com/kimabrandt/yarip/issues/6#issuecomment-273702085"}}}