Floating Menu Bar (GitHub)

Makes the menu bar in GitHub stay at the top of the page when scrolling

07.02.2016 itibariyledir. En son verisyonu görün.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name        Floating Menu Bar (GitHub)
// @namespace   chriskim06
// @description Makes the menu bar in GitHub stay at the top of the page when scrolling
// @include     https://github.com/*
// @version     1.0.2
// @grant       none
// @locale      en
// ==/UserScript==

(function() {
  var menu = document.getElementsByClassName('header header-logged-in true');
  if (menu.length) {
    menu[0].style.position = 'fixed';
    menu[0].style.zIndex = '10000';
    menu[0].style.width = '100%';
    var content = document.getElementsByClassName('main-content');
    if (content.length) {
      content[0].style.position = 'relative';
      content[0].style.top = '50px';
    }
    content = document.getElementsByClassName('container');
    var footer = content.item(content.length - 1);
    if (footer !== null) {
      footer.style.position = 'relative';
      footer.style.top = '50px';
    }
  }
})();