Greasy Fork镜像 is available in English.

Floating Menu Bar (GitHub)

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

Verzia zo dňa 16.09.2016. Pozri najnovšiu verziu.

// ==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.6
// @grant       none
// @locale      en
// ==/UserScript==

(function() {
  var content = document.querySelector('div.header.header-logged-in.true');
  if (content !== null) {
    content.style.position = 'fixed';
    content.style.zIndex = '10000';
    content.style.width = '100%';
    content = document.querySelector('#js-flash-container');
    if (content !== null) {
      content.style.position = 'relative';
      content.style.top = '50px';
    }
    content = document.querySelector('div[role="main"]');
    if (content !== null) {
      content.style.position = 'relative';
      content.style.top = '50px';
    }
    content = document.querySelector('div.container.site-footer-container');
    if (content !== null) {
      content.style.position = 'relative';
      content.style.top = '50px';
    }
  }
})();
长期地址
遇到问题?请前往 GitHub 提 Issues。