因为谷歌搜索每次链接点击后总是在当前页面加载,让我很难受,所以随便弄了个油猴脚本
// ==UserScript==
// @name Google Search Open in New Tab
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Make Google Search results open in new tabs by default when clicked with the left mouse button.
// @author 马克思
// @include *://*google.*/*
// @grant none
// @license MIT
// @icon https://www.google.com/s2/favicons?sz=64&domain=google.com
// ==/UserScript==
(function() {
'use strict';
document.querySelectorAll('a').forEach(function(link) {
if (link.href && link.closest('#search')) {
link.setAttribute('target', '_blank'); // Open in new tab
link.addEventListener('click', function(e) {
// Prevent the default action of opening in the same tab
e.preventDefault();
window.open(link.href, '_blank');
});
}
});
})();