// ==UserScript== // @name 百度不新开 // @namespace FL // @version 0.0.1 // @include * // @description 当前标签页打开百度搜索结果页面链接 // @author juby // @match *://*.baidu.com/s* // @grant none // @downloadURL none // ==/UserScript== (function() { 'use strict'; let links = document.getElementsByTagName('a'); for (let i=0; i < links.length; i++) { if (links[i].target = '_blank') { links[i].target = '_self'; } } })();