Makes the menu bar in GitHub stay at the top of the page when scrolling
当前为
// ==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.0
// @grant none
// @locale en
// ==/UserScript==
(function() {
console.log('begin');
var menu = document.getElementsByClassName('header header-logged-in true');
if (menu.length) {
console.log('menu');
menu[0].style.position = 'fixed';
menu[0].style.zIndex = '10000';
menu[0].style.width = '100%';
var content = document.getElementsByClassName('main-content');
if (content.length) {
console.log('content');
menu[0].style.position = 'relative';
menu[0].style.top = '50px';
}
}
})();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址