page view optimize - "esdoc"

I love esdoc!

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         page view optimize - "esdoc"
// @namespace    https://xianghongai.github.io/
// @version      0.0.1
// @description  I love esdoc!
// @author       Nicholas Hsiang
// @icon         https://xinlu.ink/favicon.ico
// @match        https://esdoc.org/*
// @grant        GM_addStyle
// @license      MIT
// ==/UserScript==

(function () {
  'use strict';
  
  const style = `
#all-tags+ul {
  position: fixed;
  right: 0;
  top: 0;
  z-index: 9;
  background: white;
  list-style: none;
  overflow-y: auto;
  bottom: 0;
  width: 200px;
  box-shadow: -1px 0 10px rgba(0,0,0,.1);
  box-sizing: border-box;
}
#all-tags + ul li {
  list-style: none;
}
#all-tags + ul ul {
}
#all-tags + ul ul {
  padding-left: 0;
}
#all-tags + ul > li:first-child {
  margin-top: 20px;
}
#all-tags + ul>li>a {
  font-weight: bold;
  color: #666;
  font-size: 14px;
}
#all-tags + ul > li {
  margin-top: 10px;
}
body > .content {
  padding-right: 220px;
}
#all-tags + ul > li:last-child {
  margin-bottom: 50px;
}
`;

  GM_addStyle(style);

  function initial(style) {
    let headEle = document.head || document.getElementsByTagName('head')[0];
    let styleEle = document.createElement('style');

    styleEle.type = 'text/css';

    if (styleEle.styleSheet) {
      styleEle.styleSheet.cssText = style;
    } else {
      styleEle.appendChild(document.createTextNode(style));
    }

    headEle.appendChild(styleEle);
  }

  // initial(style);
})();