page view optimize - "esdoc"

I love esdoc!

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==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);
})();