Advertisement
Guest User

SE userscript

a guest
Jan 7th, 2014
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name       Fixed Topbar
  3. // @namespace  stackexchange.com
  4. // @version    0.1
  5. // @description  SE topbar fixed
  6. // @include    http*://*.stackexchange.com/*
  7. // @include    http*://*stackoverflow.com/*
  8. // @include    http*://*superuser.com/*
  9. // @include    http*://*serverfault.com/*
  10. // @exclude    http*://chat.stackexchange.com/*
  11. // @exclude    http*://chat.meta.stackoverflow.com/*
  12. // @exclude    http*://chat.stackoverflow.com/*
  13. // @copyright  2013+, You
  14. // ==/UserScript==
  15.  
  16.  
  17. var topbar = document.getElementsByClassName("topbar")[0];
  18. var container = document.getElementsByClassName("container")[0];
  19. var imgs = document.getElementsByTagName("img");
  20. var links = topbar.getElementsByTagName("a");
  21.  
  22. for (var i = imgs.length - 1; i >= 0; i--)
  23. {
  24.     imgs[i].src = imgs[i].src.replace(/http:\/\/i.stack/g, 'https://i.stack');
  25. }
  26. /*for (var j = links.length - 1; j >= 0; j--)
  27. {
  28.     links[j].href = links[j].href.replace(/http:/g, 'https:');
  29. }*/
  30.  
  31. topbar.style.position = "fixed";
  32. topbar.style.top = "0";
  33. topbar.style.zIndex = "1000";
  34. topbar.style.fontSize = "12px";
  35. container.style.marginTop = "35px";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement