Last active
January 23, 2024 10:40
-
-
Save Hunlongyu/2d7cc7db66b79831c3af23cc52a85845 to your computer and use it in GitHub Desktop.
『净网卫士』 百度翻译
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name 『净网卫士』 百度翻译 | |
// @author Hunlongyu | |
// @namespace https://github.com/Hunlongyu | |
// @icon https://i.loli.net/2019/04/22/5cbd720718fdb.png | |
// @description 页面精简,去除广告,只保留主要功能的部分。 | |
// @version 0.1.11 | |
// @match *://fanyi.baidu.com/* | |
// @grant GM_addStyle | |
// @grant GM_log | |
// @run-at document-start | |
// @supportURL https://gist.github.com/Hunlongyu/2d7cc7db66b79831c3af23cc52a85845 | |
// @note 2019/09/05 移除第一次进入百度翻译时,弹出的向导弹框 | |
// @note 2020/07/28 移除按钮 | |
// @note 2022/03/04 隐藏新版头部导航 | |
// @note 2023/06/07 隐藏 app 推广、领域、评价 | |
// @note 2023/07/13 隐藏 桌面端软件推广 | |
// ==/UserScript== | |
(function () { | |
'use strict' | |
let css = ` | |
#header{display:none !important;} | |
.collection-btn{display: none !important;} | |
.footer{display: none !important;} | |
.manual-trans-btn{display: none !important;} | |
.trans-other-right{display: none;} | |
#app-read{display: none !important;} | |
.app-guide{display: none !important;} | |
.trans-domain-btn{display: none !important;} | |
.op-trans-fb{display: none !important;} | |
.domain-trans-wrapper{display: none !important;} | |
.select-to-language:after{display: none !important;} | |
.desktop-guide-wrapper{display: none !important;} | |
.ai-trans-btn{display: none !important;} | |
` | |
try { | |
GM_addStyle(css) | |
} catch (e) { | |
GM_log(new Error('GM_addStyle stopped working!')) | |
} | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
666