sidola / Unsticky headers on Medium

// ==UserScript==
// @name         Unsticky headers on Medium
// @version      1.0.0
// @description  Unstickies Medium divs
// @match        http://*/*
// @match        https://*/*
// @copyright 2017, sidola (https://openuserjs.org/users/sidola)
// @license MIT
// ==/UserScript==

(function() {
    'use strict';
    const logoElement = document.getElementsByClassName('js-metabarLogoLeft');

    if (logoElement.length < 1) {
        // Not on a Medium site, exit
        return;
    }

    if (logoElement.length > 0) {
        const firstChild = logoElement[0].children[0];
        const hrefAttr = firstChild.getAttribute('href');

        if (hrefAttr.includes('medium.com')) {
            document.getElementsByClassName('metabar')[0]
                .classList.remove("u-fixed");

            document.getElementsByClassName('js-stickyFooter')[0]
                .classList.remove("u-fixed");
        }
    }

})();