Fixed Stack Exchange Top Bar

Fixes the top bar of Stack Exchange sites so that it remains at the top with scrolling

  1. // ==UserScript==
  2. // @name Fixed Stack Exchange Top Bar
  3. // @author Cameron Bernhardt (AstroCB)
  4. // @version 2.2
  5. // @namespace https://github.com/AstroCB
  6. // @description Fixes the top bar of Stack Exchange sites so that it remains at the top with scrolling
  7. // @include http://*.stackexchange.com/*
  8. // @include http://stackoverflow.com/*
  9. // @include http://meta.stackoverflow.com/*
  10. // @include http://serverfault.com/*
  11. // @include http://meta.serverfault.com/*
  12. // @include http://superuser.com/*
  13. // @include http://meta.superuser.com/*
  14. // @include http://askubuntu.com/*
  15. // @include http://meta.askubuntu.com/*
  16. // @include http://stackapps.com/*
  17. // ==/UserScript==
  18. var bar = document.getElementsByClassName("topbar")[0];
  19. bar.style.position = "fixed";
  20. bar.style.backgroundColor = "black";
  21. bar.style.zIndex = "12345";
  22. document.getElementById("header").style.paddingTop = "34px";

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址