const STYLE_TEMPLATE = ` .insert_template_random{display:none;} @media screen and (max-width: 768px){ *{margin:0;padding:0;} .insert_template_random.show{display:block;} .insert_template_random{position:fixed;bottom:0;left:0;right:0;margin:0;text-indent:0!important;line-height:initial;} .insert_template_random .it_content{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:9px 15px!important;box-sizing:border-box;background:#2993FF;} .insert_template_random .it_content_info{flex:1;overflow:hidden;padding:0!important;} .insert_template_random .it_content_info h2{margin:0!important;padding:0;border-bottom:none;background:transparent;color:#fff!important;font-size:15px;font-weight:500;line-height:initial;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;} .insert_template_random .it_content_info h2:before,.insert_template_random .it_content_info h2:after{display:none;} .insert_template_random .it_content_info .info_text{color:#fff;font-size:14px;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:5px;} .insert_template_random .it_content_info .info_text span{color:#fff;display:contents;} .insert_template_random .btn_info{display:flex;flex-direction:column;gap:5px;flex:none;} .insert_template_random .btn_info a{display:inline-block;padding:0 6px;min-width:90px;height:36px;line-height:36px;border-radius:5px;background:#fff;color:#FF0000;font-size:14px;font-weight:500;text-align:center;text-decoration:none!important;} .close-btn{position:relative;width:20px;height:20px;background:transparent;border:none;outline:none;cursor:pointer;} .close-btn::before,.close-btn::after{content:'';position:absolute;left:50%;top:50%;width:2px;height:14px;background:#fff;transform-origin:center;} .close-btn::before{transform:translate(-50%,-50%) rotate(45deg);} .close-btn::after{transform:translate(-50%,-50%) rotate(-45deg);} }`; const AD_DATA = [{ keywords: ['漫画', '入口'], title: '🔥 全网难寻的私藏好内容', desc: '戳开!看看老司机藏了什么好货', link: 'https://pan.quark.cn/s/a20af04a8ed8', btnText: '👉 立即查看' }]; function shouldShowAd() { const h1 = document.querySelector('h1'); if (!h1) return false; const text = h1.textContent; return AD_DATA[0].keywords.some(kw => text.includes(kw)); } function injectStyle() { if (document.querySelector('#insert-template-style')) return; // 防止重复注入 const style = document.createElement('style'); style.id = 'insert-template-style'; style.textContent = STYLE_TEMPLATE; document.head.appendChild(style); } function createAdNode() { const data = AD_DATA[0]; const div = document.createElement('div'); div.className = 'insert_template_random is-show'; div.innerHTML = `