Greasy Fork is available in English.
"去除百度首页的推荐广告,简洁优化界面,集成谷歌搜索以及必应搜索"
当前为
// ==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
// ==/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 = $(
'<div class=container-2><div class="btn btn-two btn-t1"><span>百度</span></div><div class="btn btn-two btn-t2"><span>谷歌</span></div><div class="btn btn-two btn-t3"><span>必应</span></div></div>'
)
box.css({
textAlign: 'center',
width: '100%',
height: '33%',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
})
$('#head').append(box)
$('head').append(
"<style>.btn{position:relative;cursor: pointer;color:#5370ea;font-size:20px;font-weight:900;width:256px;height:64px;line-height:64px;transition:all 0.3s;margin-right:3%;}.btn-two::before,.btn-two::after{content:'';position:absolute;width:100%;height:100%;bottom:0;left:0;z-index:0;transition:all 0.3s;border-radius:7px;border:2px solid #5370eaff;}.btn-two:hover::after{animation-name:rotatecw;animation-duration:2s;}.btn-two:hover::before{animation-name:rotateccw;animation-duration:3s;}.btn-two:hover::after,.btn-two:hover::before{left:96px;width:64px;animation-iteration-count:infinite;animation-timing-function:linear;}@keyframes rotatecw{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}@keyframes rotateccw{from{transform:rotate(0deg);}to{transform:rotate(-360deg);}}</style>"
)
$('.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}`
})
})()