NX_DOC

调整 https://docs.sw.siemens.com/的页面,使他更适合 1980*1050 分辨率的

  1. // ==UserScript==
  2. // @name NX_DOC
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.2
  5. // @description 调整 https://docs.sw.siemens.com/的页面,使他更适合 1980*1050 分辨率的
  6. // @author gnix.oag@gmail.com
  7. // @match https://docs.sw.siemens.com/*
  8. // @match http://localhost:5000/*
  9. // @icon https://www.google.com/s2/favicons?domain=tampermonkey.net
  10. // @grant unsafaWindow
  11. // @ require http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js
  12. // @run-at document-end
  13.  
  14.  
  15. // ==/UserScript==
  16.  
  17. (function() {
  18. 'use strict';
  19. $(".body-fixed-top").css({"padding-top":"0px"}); //调整body的边距
  20.  
  21. //隐藏头部内容
  22. $("disw-header-v2").css({"display":"none"});
  23. $("#root .disw-sub-header").css({"display":"none"});
  24. $("#root .doc-toolbar").css({"display":"none"});
  25. $("#topic-navigator").css({"display":"none"});
  26.  
  27.  
  28. $(".disw-breadcrumb ol>li:first-child").css({"padding-top":"0px"});
  29.  
  30. // 把整个页面的字体调大1.5
  31. var css = 'body { font-size: 1.5em !important; }';
  32.  
  33. var style = document.createElement('style');
  34. style.type = 'text/css';
  35. style.appendChild(document.createTextNode(css));
  36.  
  37. var head = document.head || document.getElementsByTagName('head')[0];
  38. head.appendChild(style);
  39.  
  40. //修改内容页面的高度
  41. var targetDiv = document.querySelector('.doc-sidebar .doc-topics');
  42. if (targetDiv) {
  43. targetDiv.style.height = '100vh';
  44. }
  45. var targetDiv1 = document.querySelector('#doc-main > div > div.pos-r');
  46. if (targetDiv1) {
  47. targetDiv1.style.height = '100vh';
  48. }
  49.  
  50. })();

QingJ © 2025

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