Yargs Docs Fix

Fix the sidebar width

  1. // ==UserScript==
  2. // @name Yargs Docs Fix
  3. // @namespace http://kevinhill.codes
  4. // @version 0.2
  5. // @description Fix the sidebar width
  6. // @author Kevin Hill
  7. // @license MIT
  8. // @match https://yargs.js.org/docs/*
  9. // @icon https://www.google.com/s2/favicons?sz=64&domain=js.org
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. var style = document.createElement("style");
  17. style.type = "text/css";
  18. style.innerText=String.raw`
  19. .content { max-width: 100% !important; }
  20.  
  21. @media (min-width: 1200px) {
  22. .content-root { padding-left: 400px; }
  23. .menubar { width: 400px; }
  24. }
  25. `;
  26.  
  27. document.getElementsByTagName("head")[0].appendChild(style);
  28. })();