ar25iv

An Arxiv Jumper to Ar5iv (arxiv h5)

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         ar25iv
// @name:zh      ar25iv
// @name:en      ar25iv
// @namespace    https://github.com/tao-shen/ar25iv
// @homepage     https://github.com/tao-shen/ar25iv
// @version      1.3
// @author       tao.shen
// @description  An Arxiv Jumper to Ar5iv (arxiv h5)
// @description:zh  An Arxiv Jumper to Ar5iv (arxiv h5)
// @description:en  An Arxiv Jumper to Ar5iv (arxiv h5)
// @include      /^https?://(.*\.)?arxiv\.org/.*/
// @run-at       document-end
// @license      MIT License
// ==/UserScript==
window.onload=function () {
    let h0 = document.querySelector('#abs-outer > div.extra-services > div.full-text > ul');
    let h1 = document.querySelector('#abs-outer > div.extra-services > div.full-text > ul > li:nth-child(2)');
    let h2 = h1.cloneNode(h1);
    h2.children[0].text='Ar5iv';
    h2.children[0].href = h2.children[0].href.replace('/format/', '/html/').replace('arxiv','ar5iv');
    //h2.children[0].href = h2.children[0].href.replace('arxiv.org/pdf/','ar5iv.labs.arxiv.org/html/');
    h0.insertBefore(h2,h0.children[0]);
}();