// ==UserScript== // @name 解锁不太灵 // @namespace Unlock_BuTai0 // @version 1.1 // @description 解锁不太灵的VIP限制,优化搜索框,首页公告栏优雅隐藏 // @author 一身惆怅 // @match *://*.mukaku.com/* // @match *://*.butailing.com/* // @match *://*.butai0.club/* // @match *://*.butai0.xyz/* // @match *://*.butai0.dev/* // @match *://*.butai0.vip/* // @match *://*.butai0.one/* // @match *://*.0bt0.com/* // @match *://*.1bt0.com/* // @match *://*.2bt0.com/* // @match *://*.3bt0.com/* // @match *://*.4bt0.com/* // @match *://*.5bt0.com/* // @match *://*.6bt0.com/* // @match *://*.7bt0.com/* // @match *://*.8bt0.com/* // @match *://*.9bt0.com/* // @icon https://web5.mukaku.com/favicon.ico // @grant GM_addStyle // @license MIT // @run-at document-start // ==/UserScript== { const $ = (s, p = document) => p.querySelector(s); GM_addStyle(` .search-trigger { display: none !important } .gm-search-box { display: flex; align-items: center; position: relative; margin: 0 8px; } .gm-search-input { width: 160px; height: 32px; padding: 0 36px 0 14px; border: 1px solid rgb(255 255 255 / 15%); border-radius: 16px; background: rgb(255 255 255 / 8%); color: #fff; font-size: 13px; outline: none; transition: all .25s; &::placeholder { color: rgb(255 255 255 / 40%) } &:hover { background: rgb(255 255 255 / 12%); border-color: rgb(255 255 255 / 25%); } &:focus { width: 220px; background: rgb(255 255 255 / 15%); border-color: rgb(99 179 237 / 60%); box-shadow: 0 0 0 3px rgb(99 179 237 / 15%); } } .gm-search-btn { position: absolute; right: 4px; width: 26px; height: 26px; border: none; border-radius: 50%; background: transparent; color: rgb(255 255 255 / 50%); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .2s; &:hover { background: rgb(99 179 237 / 30%); color: #fff; } & svg { width: 14px; height: 14px } } .announcement-section { max-height: 54px !important; overflow: hidden !important; opacity: .6 !important; cursor: pointer !important; transition: max-height .4s cubic-bezier(.4, 0, .2, 1), opacity .3s, transform .3s !important; transform: scale(.99) !important; padding-bottom: 0 !important; & h2 { margin-bottom: 0 !important; border-bottom: 1px solid rgb(255 255 255 / 5%) !important; transition: margin-bottom .4s !important; } & .announcement-content { opacity: 0 !important; visibility: hidden !important; transition: opacity .2s, visibility .2s !important; } &:hover { max-height: 800px !important; opacity: 1 !important; transform: scale(1) !important; box-shadow: 0 8px 24px rgb(0 0 0 / 60%) !important; background: rgb(30 41 59 / 98%) !important; z-index: 9999 !important; padding-bottom: 1.5rem !important; & h2 { margin-bottom: 1.5rem !important; border-bottom-color: rgb(255 255 255 / 10%) !important; } & .announcement-content { opacity: 1 !important; visibility: visible !important; transition-delay: .1s !important; } } } .vip-gate-overlay { display: none !important; visibility: hidden !important; pointer-events: none !important; } div[style*="filter:blur"], div[style*="filter: blur"] { filter: none !important; pointer-events: auto !important; user-select: auto !important; } `); const createSearchBox = () => { const trigger = $('.search-trigger'); if (!trigger || $('.gm-search-box')) return; const box = Object.assign(document.createElement('div'), { className: 'gm-search-box', innerHTML: ` ` }); const input = $('.gm-search-input', box); const search = () => input.value.trim() && (location.href = `/search?sb=${encodeURIComponent(input.value.trim())}`); input.onkeydown = e => { if (e.key === 'Enter') search(); }; $('.gm-search-btn', box).onclick = search; trigger.before(box); }; const observer = new MutationObserver(() => { $('.search-trigger') && !$('.gm-search-box') && createSearchBox(); }); const init = () => { observer.observe(document.body, { childList: true, subtree: true }); createSearchBox(); }; document.body ? init() : document.addEventListener('DOMContentLoaded', init); console.log( '%c 解锁不太灵 %c 已移除VIP限制 ', 'background:#35495e;padding:2px 5px;border-radius:3px 0 0 3px;color:#fff', 'background:#41b883;padding:2px 5px;border-radius:0 3px 3px 0;color:#fff' ); }