scholar download

add scihub download button to google scholar

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 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         scholar download
// @namespace    https://twitter.com/threadripper_
// @version      0.1.2
// @description  add scihub download button to google scholar
// @author       @threadripper_
// @match        https://scholar.google.com/*
// @grant        none
// ==/UserScript==

(function() {
var papers = document.querySelectorAll('.gs_ri');
papers.forEach(function(item){
	var paper_link = "https://sci-hub.tw/" + item.querySelector('.gs_rt a').href;
	var down_but = `<a target="_blank" href="${paper_link}" style= "color: red; font-weight: bold;">download</a>`;
	item.querySelector('.gs_ri .gs_fl').insertAdjacentHTML('beforeend', down_but);
});
})();