Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Fixed Topbar
- // @namespace stackexchange.com
- // @version 0.1
- // @description SE topbar fixed
- // @include http*://*.stackexchange.com/*
- // @include http*://*stackoverflow.com/*
- // @include http*://*superuser.com/*
- // @include http*://*serverfault.com/*
- // @exclude http*://chat.stackexchange.com/*
- // @exclude http*://chat.meta.stackoverflow.com/*
- // @exclude http*://chat.stackoverflow.com/*
- // @copyright 2013+, You
- // ==/UserScript==
- var topbar = document.getElementsByClassName("topbar")[0];
- var container = document.getElementsByClassName("container")[0];
- var imgs = document.getElementsByTagName("img");
- var links = topbar.getElementsByTagName("a");
- for (var i = imgs.length - 1; i >= 0; i--)
- {
- imgs[i].src = imgs[i].src.replace(/http:\/\/i.stack/g, 'https://i.stack');
- }
- /*for (var j = links.length - 1; j >= 0; j--)
- {
- links[j].href = links[j].href.replace(/http:/g, 'https:');
- }*/
- topbar.style.position = "fixed";
- topbar.style.top = "0";
- topbar.style.zIndex = "1000";
- topbar.style.fontSize = "12px";
- container.style.marginTop = "35px";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement