Unreal Engine documentation automatically expands the table of contents.

Unreal Engine documentation automatically expands the table of contents.aa

  1. // ==UserScript==
  2. // @name Unreal Engine documentation automatically expands the table of contents.
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description Unreal Engine documentation automatically expands the table of contents.aa
  6. // @author You
  7. // @match https://docs.unrealengine.com/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=unrealengine.com
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. const intervalId = setInterval(() => {
  17. const element = document.getElementById('NavPanelList');
  18. if (element) {
  19. Array.from(document.getElementsByTagName('ul')).forEach(x=>x.removeAttribute('style'))
  20. clearInterval(intervalId);
  21. } else {
  22. console.log('waiting NavPanelList');
  23. }
  24. }, 1000);
  25.  
  26. })();