// ==UserScript== // @name 简单的青柠起始页优化 // @namespace https://bbs.tampermonkey.net.cn/ // @version 0.1.0 // @description 默认去掉青柠起始页的页脚,使用 alt + t 控制搜索框的显示隐藏 // @author Hei // @match https://limestart.cn/ https://limestart.cn/?from=ext // ==/UserScript== (function () { 'use strict'; const timer = setInterval(() => { const footer = document.querySelector("footer.brief"); if(footer) { footer.style.display = 'none' clearInterval(timer) } }, 500); let showSearch = true; document.body.addEventListener("keydown", (e) => { if(e.altKey && e.key === 't') { const newShowSearch = !showSearch; const searchSuggestionContainer = document.getElementById("searchSuggestionContainer"); const menuSearchEng = document.getElementById("menuSearchEng"); const searchEl = document.getElementById("searchBar"); if(searchEl) { showSearch = newShowSearch searchEl.style.display = showSearch ? 'block' : 'none'; } if(searchSuggestionContainer) { searchSuggestionContainer.style.display = showSearch ? 'block' : 'none'; } if(menuSearchEng) { menuSearchEng.style.display = showSearch ? 'block' : 'none'; } } }); console.log('start') })();