// ==UserScript== // @name "百度首页简洁优化" // @version 0.32 // @license MIT // @author 初晓 // @namespace https://github.com/zhChuXiao // @resource icon https://m.yuoo.cn/img/1logo.gif // @match *://*.baidu.com/* // @match chrome://new-tab-page // @match *://www.google.com*/ // @description:zh-cn "去除百度首页的推荐广告,简洁优化界面,集成谷歌搜索以及必应搜索" // @description "去除百度首页的推荐广告,简洁优化界面,集成谷歌搜索以及必应搜索" // @require https://cdn.bootcdn.net/ajax/libs/jquery/3.6.3/jquery.js // @downloadURL none // ==/UserScript== ;(function () { 'use strict' //if(new URL(location.href).pathname !== '/') return false; $('#s_lg_img_new').attr('src', 'https://m.yuoo.cn/img/1logo.gif') document.querySelector('#s_wrap').remove() document.querySelector('#s-top-left').remove() $('#s_form_wrapper').css({ position: 'absolute', top: '40%', }) $('.s_btn_wr').remove() $('#head_wrapper #kw').css({ borderRadius: '10px' }) let box = $( '
百度
谷歌
必应
' ) box.css({ textAlign: 'center', width: '100%', height: '33%', display: 'flex', justifyContent: 'center', alignItems: 'center', }) $('#head').append(box) $('head').append( "" ) $('.btn-t1').click(() => { location.href = `https://www.baidu.com/s?wd=${$('#head_wrapper #kw')[0].value}` }) $('.btn-t2').click(() => { location.href = `https://www.google.com/search?q=${$('#head_wrapper #kw')[0].value}` }) $('.btn-t3').click(() => { location.href = `https://www.bing.com/search?q=${$('#head_wrapper #kw')[0].value}` }) })()