NX_DOC

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

目前為 2023-07-02 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         NX_DOC
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  调整 https://docs.sw.siemens.com/的页面,使他更适合 1980*1050 分辨率的
// @author       [email protected]
// @match        https://docs.sw.siemens.com/*
// @match        http://localhost:5000/*
// @icon         https://www.google.com/s2/favicons?domain=tampermonkey.net
// @grant        unsafaWindow
// @ require      http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js
// @run-at       document-end


// ==/UserScript==

(function() {
    'use strict';
$(".body-fixed-top").css({"padding-top":"0px"}); //调整body的边距

    //隐藏头部内容
$("disw-header-v2").css({"display":"none"});
$("#root .disw-sub-header").css({"display":"none"});
$("#root .doc-toolbar").css({"display":"none"});
$("#topic-navigator").css({"display":"none"});


 $(".disw-breadcrumb ol>li:first-child").css({"padding-top":"0px"});

// 把整个页面的字体调大1.5
    var css = 'body { font-size: 1.5em !important; }';

    var style = document.createElement('style');
    style.type = 'text/css';
    style.appendChild(document.createTextNode(css));

    var head = document.head || document.getElementsByTagName('head')[0];
    head.appendChild(style);

//修改内容页面的高度
 var targetDiv = document.querySelector('.doc-sidebar .doc-topics');
    if (targetDiv) {
        targetDiv.style.height = '100vh';
    }
 var targetDiv1 = document.querySelector('#doc-main > div > div.pos-r');
    if (targetDiv1) {
        targetDiv1.style.height = '100vh';
    }

})();