Skip to content

Instantly share code, notes, and snippets.

@JoelLisenby
Last active December 13, 2019 17:36
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 JoelLisenby/a65736e9bc510332241b45593db56d32 to your computer and use it in GitHub Desktop.
Save JoelLisenby/a65736e9bc510332241b45593db56d32 to your computer and use it in GitHub Desktop.
JavaScript to find hidden horizontal scroll elements. Paste into browser JS console and hit enter.
var docWidth = document.documentElement.offsetWidth;
[].forEach.call(
document.querySelectorAll('*'),
function(el) {
if (el.offsetWidth > docWidth) {
console.log(el);
}
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment