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

Fra 08.02.2016. Se den seneste versjonen.

  1. // ==UserScript==
  2. // @name Floating Menu Bar (GitHub)
  3. // @namespace chriskim06
  4. // @description Makes the menu bar in GitHub stay at the top of the page when scrolling
  5. // @include https://github.com/*
  6. // @version 1.0.3
  7. // @grant none
  8. // @locale en
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. var menu = document.getElementsByClassName('header header-logged-in true');
  13. if (menu.length) {
  14. menu[0].style.position = 'fixed';
  15. menu[0].style.zIndex = '10000';
  16. menu[0].style.width = '100%';
  17. var flash = document.getElementById('js-flash-container');
  18. if (flash !== null) {
  19. flash.style.position = 'relative';
  20. flash.style.top = '50px';
  21. }
  22. var content = document.getElementsByClassName('main-content');
  23. if (content.length) {
  24. content[0].style.position = 'relative';
  25. content[0].style.top = '50px';
  26. }
  27. content = document.getElementsByClassName('container');
  28. var footer = content.item(content.length - 1);
  29. if (footer !== null) {
  30. footer.style.position = 'relative';
  31. footer.style.top = '50px';
  32. }
  33. }
  34. })();