Greasy Fork

Add ar5iv Links to arXiv

Automatically adds ar5iv links to arXiv paper pages for easier HTML viewing.

目前为 2024-08-07 提交的版本。查看 最新版本

// ==UserScript==
// @name            Add ar5iv Links to arXiv
// @namespace       http://tampermonkey.net/
// @version         1.0
// @description     Automatically adds ar5iv links to arXiv paper pages for easier HTML viewing.
// @description:ja  arXiv論文ページにar5ivリンクを自動追加し、HTMLでの閲覧を容易にします。
// @author          sho9029
// @match           https://arxiv.org/abs/*
// @icon            data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant           none
// @license         MIT
// ==/UserScript==

(function() {
    'use strict';

    const ul = document.querySelector("#abs-outer > div.extra-services > div.full-text > ul");
    const li = document.createElement("li");
    const a = document.createElement("a");
    a.href = window.location.href.replace("arxiv", "ar5iv");
    a.textContent = "HTML (ar5iv)";
    li.appendChild(a);

    ul.insertBefore(li, ul.children[3]);
})();