Skip to content

Instantly share code, notes, and snippets.

@o-az
Created November 2, 2023 11:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save o-az/866538cd22f94e71996c1e0d7ce6b67f to your computer and use it in GitHub Desktop.
Save o-az/866538cd22f94e71996c1e0d7ce6b67f to your computer and use it in GitHub Desktop.
Hide ugly default browser scrollbar without affecting functionality
// ==UserScript==
// @name Hide Scrollbar
// @namespace http://example.com
// @version 1
// @grant GM_addStyle
// @include https://twitter.com/*
// @include https://x.com/*
// @include https://warpcast.com/*
// ==/UserScript==
GM_addStyle(`
*::-webkit-scrollbar {
height: 0.3rem;
width: 0.5rem;
}
*::-webkit-scrollbar-track {
-ms-overflow-style: none;
overflow: -moz-scrollbars-none;
}
*::-webkit-scrollbar-thumb {
-ms-overflow-style: none;
overflow: -moz-scrollbars-none;
}
input[data-testid="SearchBox_Search_Input"] {
width: 100% !important;
}
`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment