Fixed Element Hider

Hide annoying fixed elements when scrolling through the page.

  1. // ==UserScript==
  2. // @name Fixed Element Hider
  3. // @namespace https://github.com/ephanoco
  4. // @version 0.1
  5. // @description Hide annoying fixed elements when scrolling through the page.
  6. // @author Samuel
  7. // @match https://zhuanlan.zhihu.com/p/*
  8. // @match https://blog.csdn.net/*/article/details/*
  9. // @icon https://www.google.com/s2/favicons?domain=tampermonkey.net
  10. // @grant none
  11. // @license GNU GPLv3
  12. // ==/UserScript==
  13.  
  14. (function() {
  15. 'use strict';
  16. if (window.location.href.indexOf('https://zhuanlan.zhihu.com/p/') !== -1) {
  17. var header = document.querySelector('.ColumnPageHeader-Wrapper')
  18. header.style.display = 'none'
  19. var actions = document.querySelector('.RichContent-actions')
  20. actions.style.display = 'none'
  21. } else if (window.location.href.indexOf('https://blog.csdn.net/') !== -1) {
  22. var toolbar = document.querySelector('#csdn-toolbar')
  23. toolbar.style.display = 'none'
  24. var toolbox = document.querySelector('.left-toolbox')
  25. toolbox.style.display = 'none'
  26. }
  27. })();