Hide Inoreader Navigation Bar on Click

Shrinks and dims Inoreader's top navigation bar. Clicking restores original size. Clicking again shrinks the navigation bar.

  1. // ==UserScript==
  2. // @name Hide Inoreader Navigation Bar on Click
  3. // @namespace http://tampermonkey.net/
  4. // @license MIT
  5. // @version 1.0
  6. // @description Shrinks and dims Inoreader's top navigation bar. Clicking restores original size. Clicking again shrinks the navigation bar.
  7. // @author Rekt
  8. // @match *://*.inoreader.com/*
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function () {
  13. 'use strict';
  14.  
  15. const navBar = document.getElementById('subscriptions_buttons');
  16. let isNavBarExpanded = true; // Track the state of the navigation bar
  17.  
  18. if (navBar) {
  19. const expandNavBar = () => {
  20. navBar.style.height = 'auto';
  21. navBar.style.overflow = 'visible';
  22. navBar.style.opacity = '1';
  23. isNavBarExpanded = true;
  24. };
  25.  
  26. const minimizeNavBar = () => {
  27. navBar.style.height = '10px';
  28. navBar.style.overflow = 'hidden';
  29. navBar.style.opacity = '0.2';
  30. isNavBarExpanded = false;
  31. };
  32.  
  33. document.addEventListener('click', (event) => {
  34. if (!event.target.closest('button, input[type="text"], img, .inno_toolbar_button_menu, .inno_toolbar_button_menu_item')) {
  35. if (navBar.contains(event.target)) {
  36. // Toggle the navigation bar when clicking inside
  37. isNavBarExpanded ? minimizeNavBar() : expandNavBar();
  38. } else {
  39. // Automatically minimize if clicking outside the navbar/container
  40. minimizeNavBar();
  41. }
  42. }
  43. });
  44.  
  45. // Initialize with the navigation bar fully visible
  46. expandNavBar();
  47. }
  48.  
  49. })();

QingJ © 2025

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