Awesome Open Source
Awesome Open Source


A bookmarklet to remove sticky elements and restore scrolling to web pages!


Demonstration of kill-sticky


Alisdair McDiarmid wrote at his Kill sticky headers bookmarklet page...

I hate sticky headers. I want to kill sticky headers.

I could not agree more.

But, while McDiarmid's code has already been immensely helpful to me, I wanted to extend it to also kill of another recent trend: marketing modals. They also abuse position: fixed styling and remove your ability to scroll with overflow: hidden. Not cool, man.

And that's what this extension aims to address:


Make a new bookmark (on your bookmark bar) with the following URL:


Installation of kill-sticky


Every time you see a bothersome fixed position element and/or loss of scrolling functionality, click the bookmark!

This may break the page sometimes, such as deleting nav or causing scrollbars to show up where they shouldn't. If that happens, just reload the page.

How the bookmarklet works

  1. Iterate through all child nodes of body. Delete the node if it is styled with position: fixed.
  2. Set the style of the html node for overflow: auto.
    document.querySelectorAll('body *').forEach(function(node) {
        if (['fixed', 'sticky'].includes(getComputedStyle(node).position))  {

    document.querySelectorAll('html *').forEach(function(node) {
        var s = getComputedStyle(node);
        if ('hidden' === s['overflow']) {['overflow'] = 'visible'; }
        if ('hidden' === s['overflow-x']) {['overflow-x'] = 'visible'; }
        if ('hidden' === s['overflow-y']) {['overflow-y'] = 'visible'; }

    var htmlNode = document.querySelector('html');['overflow'] = 'visible';['overflow-x'] = 'visible';['overflow-y'] = 'visible';

Building (Only if you want to contribute)

We're creating a bookmarklet, so our code needs to be minified and URL encoded.

Run the following the project root directory:

$ docker build . -t kill-sticky && docker run --rm -it -v $(pwd):/kill-sticky kill-sticky

This will update the project with the build version.

Alternative Project Comparisons
Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Javascript (1,072,185
Remove (5,444
Bookmark (4,243
Scrolling (3,668
Restore (3,629
Sticky Elements (57