arxiv html beautify

Beautify arxiv. 美化arxiv html版,修改字体等,沉浸式阅读,学术必备好帮手

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         arxiv html beautify
// @namespace    http://tampermonkey.net/
// @version      0.161
// @description  Beautify arxiv. 美化arxiv html版,修改字体等,沉浸式阅读,学术必备好帮手
// @author       dlutor
// @match        https://arxiv.org/html/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=arxiv.org
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    window.onload=function(){
        const header = document.querySelector("body > header.desktop_header");
        if (header) header.remove();
        const alertBtn = document.querySelector("#main > div > div.package-alerts.ltx_document > button > span");
        if (alertBtn) alertBtn.click();
        const style = document.createElement('style');
        style.innerHTML = `.ltx_p, .ltx_abstract  .ltx_p{ font-family: 'STIX Two Math';}
        .ltx_transformed_inner>.ltx_p{ font-family: auto;}
        .ltx_text.ltx_ref_title {display: flex;}
        .ltx_tocentry_section>.ltx_ref>.ltx_ref_title>.ltx_tag {margin-right: 0rem;}
        body:after {content: ""; position: inherit;}
        nav.ltx_TOC {padding-top: 15px;}
        .ltx_page_main > .ltx_page_content {margin: 10px 1em 3.5em 1em;}`;
        document.head.appendChild(style);
        document.querySelector("#openForm").remove();
    }

    // Your code here...
})();