When we use the Google browser Google search problem, we will encounter a problem, that is, clicking the search result will directly open a new page, and then overwrite the previous search result, then how to set it in the browser What about setting Google search results to click to open a new page without overwriting the search results?
1. Find the Tampermonkey browser script extension in the Google App Store. It is suitable for almost all browsers on the market.
Although some supported browsers have native user script support, Tampermonkey will provide more in your user script management. Much convenience. It provides many functions such as convenient script installation, automatic update check, a quick overview of the running status of the script in the label, and a built-in editor. At the same time, Tampermonkey may also run normally incompatible scripts.
2. Add the following script to the Tampermonkey browser script extension to complete the setting of the Google search results. Click to open a new page
// ==UserScript==
// @name 谷歌搜索打开新页面
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 谷歌搜索追加target="_blank"
// @author gu
// @grant none
// @include *://www.google.com/*
// @include *://www.google.com/*
// @note 谷歌搜索追加target="_blank"
// ==/UserScript==
(function(){
'use strict';
var aLink = document.querySelectorAll('#search a[href]');
for (var i = 0, k = aLink.length; i < k; i++) {
aLink[i].setAttribute('target', '_blank');
}
})();