您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Embed OpenReview link with arXiv paper title in the arXiv paper page
当前为
- // ==UserScript==
- // @name Add OpenReview Link in arXiv
- // @namespace http://github.com/awyugan
- // @version 0.1
- // @description Embed OpenReview link with arXiv paper title in the arXiv paper page
- // @author awyugan
- // @match https://arxiv.org/abs/*
- // @grant GM_addStyle
- // @license MIT
- // ==/UserScript==
- (function() {
- 'use strict';
- // 获取 arXiv 页面中的论文标题
- let titleElement = document.querySelector('h1.title.mathjax');
- if (titleElement) {
- let titleText = titleElement.textContent.trim();
- // 创建 openreview 的链接
- let openreviewLink = document.createElement('a');
- openreviewLink.href = 'https://openreview.net/search?term=' + encodeURIComponent(titleText);
- openreviewLink.target = '_blank';
- openreviewLink.innerText = 'Open in openreview\n';
- openreviewLink.style.display = 'block';
- // 创建 hn.algolia 的链接
- let algoliaLink = document.createElement('a');
- algoliaLink.href = 'https://hn.algolia.com/?q=' + encodeURIComponent(titleText);
- algoliaLink.target = '_blank';
- algoliaLink.innerText = 'Search on hn.algolia\n';
- algoliaLink.style.display = 'block';
- // 查找指定的div并将链接插入其中
- let fullTextDiv = document.querySelector('div.full-text');
- if (fullTextDiv) {
- fullTextDiv.appendChild(openreviewLink);
- fullTextDiv.appendChild(algoliaLink);
- }
- }
- })();