Add ar5iv Links to arXiv

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

当前为 2024-08-07 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Add ar5iv Links to arXiv
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description Automatically adds ar5iv links to arXiv paper pages for easier HTML viewing.
  6. // @description:ja arXiv論文ページにar5ivリンクを自動追加し、HTMLでの閲覧を容易にします。
  7. // @author sho9029
  8. // @match https://arxiv.org/abs/*
  9. // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
  10. // @grant none
  11. // @license MIT
  12. // ==/UserScript==
  13.  
  14. (function() {
  15. 'use strict';
  16.  
  17. const ul = document.querySelector("#abs-outer > div.extra-services > div.full-text > ul");
  18. const li = document.createElement("li");
  19. const a = document.createElement("a");
  20. a.href = window.location.href.replace("arxiv", "ar5iv");
  21. a.textContent = "HTML (ar5iv)";
  22. li.appendChild(a);
  23.  
  24. ul.insertBefore(li, ul.children[3]);
  25. })();