Skip to content

Instantly share code, notes, and snippets.

@cgranade
Created January 12, 2015 23:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cgranade/f0a0f9c1fbf39c8fc68a to your computer and use it in GitHub Desktop.
Save cgranade/f0a0f9c1fbf39c8fc68a to your computer and use it in GitHub Desktop.
Link arXiv → SciRate
// ==UserScript==
// @name Link arXiv → SciRate
// @namespace http://www.cgranade.com/
// @version 0.1
// @description Adds links to SciRate from arXiv papers.
// @match http://arxiv.org/abs/*
// @copyright 2015+, You
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js
// ==/UserScript==
var new_elem = $('<div class="full-text"><span class="descriptor">SciRate</span><h2>SciRate</h2><ul><li><a href="">View on SciRate</a></li></ul></div>');
$('a', new_elem).attr('href', document.URL.replace("://arxiv.org/abs/", "://scirate.com/arxiv/"));
$('.extra-services').prepend(new_elem);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment