Automatically redirect to search result when there is only one result in a Google Scholar search
当前为
// ==UserScript==
// @name Google Scholar Auto Redirect
// @version 0.1.0
// @author sincostandx
// @description Automatically redirect to search result when there is only one result in a Google Scholar search
// @namespace https://greasyfork.org/users/171198
// @grant none
// @match https://scholar.google.com/scholar*
// ==/UserScript==
links = document.querySelectorAll('.gs_rt > a');
if (links.length !== 1)
return;
if (sessionStorage.getItem(location.href) === null) {
// Prevent redirection when back button is pressed
sessionStorage.setItem(location.href,'1');
links[0].click();
}