diff --git "a/packages/\343\200\220\347\247\273\345\212\250\347\253\257\343\200\221\347\231\276\345\272\246\347\263\273\344\274\230\345\214\226/SCRIPT_VERSION.json" "b/packages/\343\200\220\347\247\273\345\212\250\347\253\257\343\200\221\347\231\276\345\272\246\347\263\273\344\274\230\345\214\226/SCRIPT_VERSION.json" index 533f84a46..469e9b3dc 100644 --- "a/packages/\343\200\220\347\247\273\345\212\250\347\253\257\343\200\221\347\231\276\345\272\246\347\263\273\344\274\230\345\214\226/SCRIPT_VERSION.json" +++ "b/packages/\343\200\220\347\247\273\345\212\250\347\253\257\343\200\221\347\231\276\345\272\246\347\263\273\344\274\230\345\214\226/SCRIPT_VERSION.json" @@ -1,4 +1,4 @@ { - "time": 1717042882313, - "version": "2024.5.30" + "time": 1717120847720, + "version": "2024.5.31" } \ No newline at end of file diff --git "a/packages/\343\200\220\347\247\273\345\212\250\347\253\257\343\200\221\347\231\276\345\272\246\347\263\273\344\274\230\345\214\226/dist/\343\200\220\347\247\273\345\212\250\347\253\257\343\200\221\347\231\276\345\272\246\347\263\273\344\274\230\345\214\226.min.user.js" "b/packages/\343\200\220\347\247\273\345\212\250\347\253\257\343\200\221\347\231\276\345\272\246\347\263\273\344\274\230\345\214\226/dist/\343\200\220\347\247\273\345\212\250\347\253\257\343\200\221\347\231\276\345\272\246\347\263\273\344\274\230\345\214\226.min.user.js" index 709c1c760..362e65aae 100644 --- "a/packages/\343\200\220\347\247\273\345\212\250\347\253\257\343\200\221\347\231\276\345\272\246\347\263\273\344\274\230\345\214\226/dist/\343\200\220\347\247\273\345\212\250\347\253\257\343\200\221\347\231\276\345\272\246\347\263\273\344\274\230\345\214\226.min.user.js" +++ "b/packages/\343\200\220\347\247\273\345\212\250\347\253\257\343\200\221\347\231\276\345\272\246\347\263\273\344\274\230\345\214\226/dist/\343\200\220\347\247\273\345\212\250\347\253\257\343\200\221\347\231\276\345\272\246\347\263\273\344\274\230\345\214\226.min.user.js" @@ -1,7 +1,7 @@ // ==UserScript== // @name 【移动端】百度系优化 // @namespace https://github.com/WhiteSevs/TamperMonkeyScript -// @version 2024.5.30 +// @version 2024.5.31 // @author WhiteSevs // @description 用于【移动端】的百度系列产品优化,包括【百度搜索】、【百家号】、【百度贴吧】、【百度文库】、【百度经验】、【百度百科】、【百度知道】、【百度翻译】、【百度图片】、【百度地图】、【百度好看视频】、【百度爱企查】、【百度问题】、【百度识图】等 // @license GPL-3.0-only @@ -48,7 +48,7 @@ (function (Ra, vue, se, Xa, yr, ei, vueRouter, iconsVue) { 'use strict'; - var Na=Object.defineProperty;var Ia=(e,t,r)=>t in e?Na(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var kt=(e,t,r)=>(Ia(e,typeof t!="symbol"?t+"":t,r),r);var $=typeof GM_addStyle<"u"?GM_addStyle:void 0,Vn=typeof GM_getResourceText<"u"?GM_getResourceText:void 0,At=typeof GM_getValue<"u"?GM_getValue:void 0,qt=typeof GM_info<"u"?GM_info:void 0,bi=typeof GM_registerMenuCommand<"u"?GM_registerMenuCommand:void 0,wr=typeof GM_setValue<"u"?GM_setValue:void 0,vi=typeof GM_unregisterMenuCommand<"u"?GM_unregisterMenuCommand:void 0,_i=typeof GM_xmlhttpRequest<"u"?GM_xmlhttpRequest:void 0,ae=typeof unsafeWindow<"u"?unsafeWindow:void 0,Ir=window;const Y={isSearch(){return !!window.location.href.match(/^http(s|):\/\/(m[0-9]{0,2}|www).baidu.com\/.*/g)},isSearchBh(){return !!(this.isSearch()&&window.location.pathname.startsWith("/bh"))},isSearchHome(){return !!(window.location.href.match(/^http(s|):\/\/(m[0-9]{0,2}|www).baidu.com\/$/g)||window.location.href.match(/^http(s|):\/\/(m[0-9]{0,2}|www).baidu.com\/(\?ref=|\?tn=|\?from=|#\/)/g))},isBaiJiaHao(){return !!window.location.href.match(/^http(s|):\/\/baijiahao.baidu.com/g)},isTieBa(){return !!window.location.href.match(/^http(s|):\/\/(tieba.baidu|www.tieba|ala.baidu|static.tieba.baidu|nba.baidu).com/g)},isTieBaPost(){return !!(this.isTieBa()&&window.location.pathname.startsWith("/p/"))},isTieBaNewTopic(){return !!(this.isTieBa()&&window.location.pathname.startsWith("/mo/q/newtopic/topicTemplate"))},isTieBaHybrid(){return !!(this.isTieBa()&&window.location.pathname.startsWith("/mo/q/hybrid"))},isTieBaNei(){return !!(this.isTieBa()&&window.location.pathname==="/f")},isTieBaIndex(){return !!(this.isTieBa()&&window.location.pathname.startsWith("/index"))},isTieBaHome(){return !!(this.isTieBa()&&window.location.pathname.startsWith("/home/main"))},isWenKu(){return !!window.location.href.match(/^http(s|):\/\/(wk|tanbi).baidu.com/g)},isJingYan(){return !!window.location.href.match(/^http(s|):\/\/jingyan.baidu.com/g)},isBaiKe(){return !!window.location.href.match(/^http(s|):\/\/(baike|wapbaike).baidu.com/g)},isBaiKeTaShuo(){return !!(this.isBaiKe()&&window.location.pathname.startsWith("/tashuo"))},isZhiDao(){return !!window.location.href.match(/^http(s|):\/\/zhidao.baidu.com/g)},isFanYi(){return !!window.location.href.match(/^http(s|):\/\/fanyi.baidu.com/g)},isFanYiApp(){return !!window.location.href.match(/^http(s|):\/\/fanyi-app.baidu.com/g)},isImage(){return !!window.location.href.match(/^http(s|):\/\/image.baidu.com/g)},isMap(){return !!window.location.href.match(/^http(s|):\/\/map.baidu.com/g)},isMbd(){return !!window.location.href.match(/^http(s|):\/\/mbd.baidu.com/g)},isXue(){return !!window.location.href.match(/^http(s|):\/\/xue.baidu.com/g)},isAiQiCha(){return !!window.location.href.match(/^http(s|):\/\/aiqicha.baidu.com/g)},isPos(){return !!window.location.href.match(/^http(s|):\/\/pos.baidu.com/g)},isHaoKan(){return !!window.location.href.match(/^http(s|):\/\/haokan.baidu.com/g)},isGraph(){return !!window.location.href.match(/^http(s|):\/\/graph.baidu.com/g)},isPan(){return !!window.location.href.match(/^http(s|):\/\/pan.baidu.com/g)},isYiYan(){return !!window.location.href.match(/^http(s|):\/\/yiyan.baidu.com/g)},isChat(){return !!window.location.href.match(/^http(s|):\/\/chat.baidu.com/g)},isMiniJiaoYu(){return !!window.location.href.match(/^http(s|):\/\/uf9kyh.smartapps.cn/g)},isEasyLearn(){return !!window.location.href.match(/^http(s|):\/\/easylearn.baidu.com/g)},isISite(){return !!window.location.href.match(/^http(s|):\/\/isite.baidu.com\/site\/wjz2tdly/g)},isAiStudy(){return !!window.location.href.match(/^http(s|):\/\/aistudy.baidu.com/g)}};class Wn{constructor(t,r){kt(this,"config");kt(this,"loadingViewElement");kt(this,"loadingViewHTML");kt(this,"loadingViewIconHTML");this.config={className:"whitesev-load-view",textClassName:"whitesev-load-view-text",iconClassName:"whitesev-load-view-icon",outSideClassName:"whitesev-load-view-icon-outside",withInClassName:"whitesev-load-view-icon-within"},this.loadingViewElement=void 0,this.loadingViewHTML=` + var Ma=Object.defineProperty;var Ia=(e,t,r)=>t in e?Ma(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var kt=(e,t,r)=>(Ia(e,typeof t!="symbol"?t+"":t,r),r);var I=typeof GM_addStyle<"u"?GM_addStyle:void 0,Vn=typeof GM_getResourceText<"u"?GM_getResourceText:void 0,At=typeof GM_getValue<"u"?GM_getValue:void 0,qt=typeof GM_info<"u"?GM_info:void 0,bi=typeof GM_registerMenuCommand<"u"?GM_registerMenuCommand:void 0,wr=typeof GM_setValue<"u"?GM_setValue:void 0,vi=typeof GM_unregisterMenuCommand<"u"?GM_unregisterMenuCommand:void 0,_i=typeof GM_xmlhttpRequest<"u"?GM_xmlhttpRequest:void 0,Z=typeof unsafeWindow<"u"?unsafeWindow:void 0,Ir=window;const Y={isSearch(){return !!window.location.href.match(/^http(s|):\/\/(m[0-9]{0,2}|www).baidu.com\/.*/g)},isSearchBh(){return !!(this.isSearch()&&window.location.pathname.startsWith("/bh"))},isSearchHome(){return !!(window.location.href.match(/^http(s|):\/\/(m[0-9]{0,2}|www).baidu.com\/$/g)||window.location.href.match(/^http(s|):\/\/(m[0-9]{0,2}|www).baidu.com\/(\?ref=|\?tn=|\?from=|#\/)/g))},isBaiJiaHao(){return !!window.location.href.match(/^http(s|):\/\/baijiahao.baidu.com/g)},isTieBa(){return !!window.location.href.match(/^http(s|):\/\/(tieba.baidu|www.tieba|ala.baidu|static.tieba.baidu|nba.baidu).com/g)},isTieBaPost(){return !!(this.isTieBa()&&window.location.pathname.startsWith("/p/"))},isTieBaNewTopic(){return !!(this.isTieBa()&&window.location.pathname.startsWith("/mo/q/newtopic/topicTemplate"))},isTieBaHybrid(){return !!(this.isTieBa()&&window.location.pathname.startsWith("/mo/q/hybrid"))},isTieBaNei(){return !!(this.isTieBa()&&window.location.pathname==="/f")},isTieBaIndex(){return !!(this.isTieBa()&&window.location.pathname.startsWith("/index"))},isTieBaHome(){return !!(this.isTieBa()&&window.location.pathname.startsWith("/home/main"))},isWenKu(){return !!window.location.href.match(/^http(s|):\/\/(wk|tanbi).baidu.com/g)},isJingYan(){return !!window.location.href.match(/^http(s|):\/\/jingyan.baidu.com/g)},isBaiKe(){return !!window.location.href.match(/^http(s|):\/\/(baike|wapbaike).baidu.com/g)},isBaiKeTaShuo(){return !!(this.isBaiKe()&&window.location.pathname.startsWith("/tashuo"))},isZhiDao(){return !!window.location.href.match(/^http(s|):\/\/zhidao.baidu.com/g)},isFanYi(){return !!window.location.href.match(/^http(s|):\/\/fanyi.baidu.com/g)},isFanYiApp(){return !!window.location.href.match(/^http(s|):\/\/fanyi-app.baidu.com/g)},isImage(){return !!window.location.href.match(/^http(s|):\/\/image.baidu.com/g)},isMap(){return !!window.location.href.match(/^http(s|):\/\/map.baidu.com/g)},isMbd(){return !!window.location.href.match(/^http(s|):\/\/mbd.baidu.com/g)},isXue(){return !!window.location.href.match(/^http(s|):\/\/xue.baidu.com/g)},isAiQiCha(){return !!window.location.href.match(/^http(s|):\/\/aiqicha.baidu.com/g)},isPos(){return !!window.location.href.match(/^http(s|):\/\/pos.baidu.com/g)},isHaoKan(){return !!window.location.href.match(/^http(s|):\/\/haokan.baidu.com/g)},isGraph(){return !!window.location.href.match(/^http(s|):\/\/graph.baidu.com/g)},isPan(){return !!window.location.href.match(/^http(s|):\/\/pan.baidu.com/g)},isYiYan(){return !!window.location.href.match(/^http(s|):\/\/yiyan.baidu.com/g)},isChat(){return !!window.location.href.match(/^http(s|):\/\/chat.baidu.com/g)},isMiniJiaoYu(){return !!window.location.href.match(/^http(s|):\/\/uf9kyh.smartapps.cn/g)},isEasyLearn(){return !!window.location.href.match(/^http(s|):\/\/easylearn.baidu.com/g)},isISite(){return !!window.location.href.match(/^http(s|):\/\/isite.baidu.com\/site\/wjz2tdly/g)},isAiStudy(){return !!window.location.href.match(/^http(s|):\/\/aistudy.baidu.com/g)}};class Wn{constructor(t,r){kt(this,"config");kt(this,"loadingViewElement");kt(this,"loadingViewHTML");kt(this,"loadingViewIconHTML");this.config={className:"whitesev-load-view",textClassName:"whitesev-load-view-text",iconClassName:"whitesev-load-view-icon",outSideClassName:"whitesev-load-view-icon-outside",withInClassName:"whitesev-load-view-icon-within"},this.loadingViewElement=void 0,this.loadingViewHTML=`
Loading...
`.trim(),this.loadingViewIconHTML=` @@ -134,7 +134,7 @@ @-ms-keyframes spinoffPulse{0%{-ms-transform:rotate(0)} 100%{-ms-transform:rotate(360deg)} } - `;$(t);}initLoadingView(t=!1,r=!0){this.setLoadingViewElement();let n=document.createElement("div");n.innerHTML=this.loadingViewHTML;let a=n.firstChild;if(t){let i=document.createElement("div");i.innerHTML=this.loadingViewIconHTML,r?a.appendChild(i.firstChild):a.insertBefore(i.firstChild,a.firstChild);}return this.setLoadingViewElement(a),a}setLoadingViewElement(t){this.loadingViewElement=t;}getLoadingViewElement(){if(!this.loadingViewElement)throw new Error("object loadingViewElement is null");return this.loadingViewElement}getIconElement(){return this.getLoadingViewElement().querySelector("."+this.config.iconClassName)}show(){this.getLoadingViewElement().style.display="";}hide(){this.getLoadingViewElement().style.display="none";}showIcon(){let t=this.getIconElement();t&&(t.style.display="");}hideIcon(){let t=this.getIconElement();t&&(t.style.display="none");}setText(t,r=!1,n=!0){var a;if(this.getLoadingViewElement().innerHTML=`${t}`,r){let i=this.getIconElement();if(!i){let o=document.createElement("div");o.innerHTML=this.loadingViewIconHTML,i=o.firstChild,n?this.getLoadingViewElement().appendChild(i):this.getLoadingViewElement().insertBefore(i,this.getLoadingViewElement().firstChild);}i.style.display="";}else (a=this.getIconElement())==null||a.remove();}destory(){var t;(t=this.getLoadingViewElement())==null||t.remove(),this.setLoadingViewElement();}removeAll(){document.querySelectorAll("."+this.config.className).forEach(t=>t.remove());}isExists(){return !!document.querySelector(`.${this.config.className}`)}isExistsIcon(){return !!this.getIconElement()}isExistsText(){return !!this.getLoadingViewElement().querySelector(`.${this.config.textClassName}`)}isExistsCSS(){return !!document.querySelector("style[data-from='loadingView'][type='text/css'][data-author='whitesev']")}}const yi="【移动端】百度系优化",p=Xa.noConflict(),v=yr.noConflict(),Rr=Ir.pops||ae.pops,en=Ir.showdown||ae.showdown,s=new p.Log(qt,ae.console||Ir.console);var $n;const tn=(($n=qt==null?void 0:qt.script)==null?void 0:$n.name)||yi,Z=new Wn(!0),Gn=!1;s.config({debug:Gn,logMaxCount:2e4,autoClearConsole:!0,tag:!0});se.config({position:"bottom",html:!0,maxNums:5,autoClose:!0,showClose:!1,showReverse:!0});const xr=new p.GM_Menu({GM_getValue:At,GM_setValue:wr,GM_registerMenuCommand:bi,GM_unregisterMenuCommand:vi}),ge=new p.Httpx(_i);ge.config({logDetails:Gn,onabort(){se.warning("请求取消");},ontimeout(){se.error("请求超时");},onerror(e){se.error("请求异常"),s.error(["httpx-onerror 请求异常",e]);}});const Ue={Object:{defineProperty:ae.Object.defineProperty},Function:{apply:ae.Function.prototype.apply,call:ae.Function.prototype.call},Element:{appendChild:ae.Element.prototype.appendChild},setTimeout:ae.setTimeout},Ut="vite-app",wi=async function(e,t){yr.ready(async()=>{const r=vue.createApp(e);let n=yr.createElement("div",{id:Ut});if(ElementPlusIconsVue!=null)for(const[a,i]of Object.entries(ElementPlusIconsVue))r.component(a,i);document.body.appendChild(n),r.use(t),r.use(Ra),r.mount(n);}),$(Vn("ElementPlusResourceCSS"));},ct="GM_Panel",Sr="data-key",kr="data-default-value",Et={defaultRule:` + `;I(t);}initLoadingView(t=!1,r=!0){this.setLoadingViewElement();let n=document.createElement("div");n.innerHTML=this.loadingViewHTML;let a=n.firstChild;if(t){let i=document.createElement("div");i.innerHTML=this.loadingViewIconHTML,r?a.appendChild(i.firstChild):a.insertBefore(i.firstChild,a.firstChild);}return this.setLoadingViewElement(a),a}setLoadingViewElement(t){this.loadingViewElement=t;}getLoadingViewElement(){if(!this.loadingViewElement)throw new Error("object loadingViewElement is null");return this.loadingViewElement}getIconElement(){return this.getLoadingViewElement().querySelector("."+this.config.iconClassName)}show(){this.getLoadingViewElement().style.display="";}hide(){this.getLoadingViewElement().style.display="none";}showIcon(){let t=this.getIconElement();t&&(t.style.display="");}hideIcon(){let t=this.getIconElement();t&&(t.style.display="none");}setText(t,r=!1,n=!0){var a;if(this.getLoadingViewElement().innerHTML=`${t}`,r){let i=this.getIconElement();if(!i){let s=document.createElement("div");s.innerHTML=this.loadingViewIconHTML,i=s.firstChild,n?this.getLoadingViewElement().appendChild(i):this.getLoadingViewElement().insertBefore(i,this.getLoadingViewElement().firstChild);}i.style.display="";}else (a=this.getIconElement())==null||a.remove();}destory(){var t;(t=this.getLoadingViewElement())==null||t.remove(),this.setLoadingViewElement();}removeAll(){document.querySelectorAll("."+this.config.className).forEach(t=>t.remove());}isExists(){return !!document.querySelector(`.${this.config.className}`)}isExistsIcon(){return !!this.getIconElement()}isExistsText(){return !!this.getLoadingViewElement().querySelector(`.${this.config.textClassName}`)}isExistsCSS(){return !!document.querySelector("style[data-from='loadingView'][type='text/css'][data-author='whitesev']")}}const yi="【移动端】百度系优化",p=Xa.noConflict(),v=yr.noConflict(),Rr=Ir.pops||Z.pops,en=Ir.showdown||Z.showdown,o=new p.Log(qt,Z.console||Ir.console);var $n;const tn=(($n=qt==null?void 0:qt.script)==null?void 0:$n.name)||yi,X=new Wn(!0),Gn=!1;o.config({debug:Gn,logMaxCount:2e4,autoClearConsole:!0,tag:!0});se.config({position:"bottom",html:!0,maxNums:5,autoClose:!0,showClose:!1,showReverse:!0});const xr=new p.GM_Menu({GM_getValue:At,GM_setValue:wr,GM_registerMenuCommand:bi,GM_unregisterMenuCommand:vi}),ge=new p.Httpx(_i);ge.config({logDetails:Gn,onabort(){se.warning("请求取消");},ontimeout(){se.error("请求超时");},onerror(e){se.error("请求异常"),o.error(["httpx-onerror 请求异常",e]);}});const Ue={Object:{defineProperty:Z.Object.defineProperty},Function:{apply:Z.Function.prototype.apply,call:Z.Function.prototype.call},Element:{appendChild:Z.Element.prototype.appendChild},setTimeout:Z.setTimeout},Ut="vite-app",wi=async function(e,t){yr.ready(async()=>{const r=vue.createApp(e);let n=yr.createElement("div",{id:Ut});if(ElementPlusIconsVue!=null)for(const[a,i]of Object.entries(ElementPlusIconsVue))r.component(a,i);document.body.appendChild(n),r.use(t),r.use(Ra),r.mount(n);}),I(Vn("ElementPlusResourceCSS"));},ut="GM_Panel",Sr="data-key",kr="data-default-value",Et={defaultRule:` // 百度健康 match-href##expert.baidu.com // 大家还在搜 @@ -176,10 +176,10 @@ match-attr##srcid##sp_purc_atom // match-attr##srcid##(car_kg2_san|car_view_point_san) // 动态(微博、百度动态...等) // match-attr##srcid##rel_ugc_san -`,rule:[],init(){let e=this.getLocalRule();y.getValue("baidu-search-enable-default-interception-rules")&&(e=this.defaultRule+` +`,rule:[],init(){let e=this.getLocalRule();_.getValue("baidu-search-enable-default-interception-rules")&&(e=this.defaultRule+` -`+e),this.rule=this.parseRule(e);},getLocalRule(){let e=y.getValue("baidu-search-interception-rules","");return e=e.trim(),e},setLocalRule(e){y.setValue("baidu-search-interception-rules",e);},clearLocalRule(){y.deleteValue("baidu-search-interception-rules");},parseRule(e){let t=[];function r(n){let a=n.split("##");if(!a.length){s.error(["无效规则",n]);return}let i=a[0],o=i.toLowerCase(),l=n.replace(i+"##","");if(o==="match-href")return {rule:n,mode:o,matchText:new RegExp(l)};if(o==="match-attr"){let c=l.split("##");if(c.length===1){s.error(["无效规则",n]);return}let u=c[0],f=l.replace(u+"##","");return {rule:n,mode:o,attr:u,matchText:new RegExp(f)}}else {if(o==="contains-child"||o==="remove-child")return {rule:n,mode:o,matchText:l};s.error(["无效规则",n]);}}return e.split(` -`).forEach(n=>{if(n=n.trim(),n===""||n.startsWith("//"))return;let a=n.split("&&&&");if(a.length===1){let i=r(n);i&&t.push(i);}else {let i=[];a.forEach(o=>{o=o.trim();let l=r(o);l&&i.push(l);}),t.push({mode:"more-rule",moreRule:i});}}),t},handleCustomRule(e,t){function r(n){var a,i;if(n.mode==="match-href"){if(typeof t=="string"&&t.match(n.matchText))return !0}else if(n.mode==="match-attr"){if(e.hasAttribute(n.attr)&&((a=e.getAttribute(n.attr))!=null&&a.match(n.matchText)))return !0}else if(n.mode==="contains-child"){if(e.querySelector(n.matchText))return !0}else n.mode==="remove-child"&&((i=e.querySelector(n.matchText))==null||i.remove());}for(const n of this.rule)if(n.moreRule){for(const a of n.moreRule)if(r(a))return !0}else if(r(n))return !0}},E=function(e,t,r,n,a){let i={text:e,type:"switch",description:a,attributes:{},getValue(){return !!y.getValue(t,r)},callback(o,l){s.success(`${l?"开启":"关闭"} ${e}`),!(typeof n=="function"&&n(o,l))&&y.setValue(t,!!l);},afterAddToUListCallBack:void 0};return i.attributes&&(i.attributes[Sr]=t,i.attributes[kr]=!!r),i},xi={id:"baidu-panel-config-search",title:"搜索",headerTitle:"百度搜索
m.baidu.com
www.baidu.com",isDefault(){return Y.isSearch()||Y.isSearchHome()||Y.isSearchBh()},forms:[{text:"主页",type:"forms",forms:[E("精简主页","baidu_search_home_homepage_minification",!0)]},{text:"百度健康(快速问医生)",type:"forms",forms:[E("【屏蔽】底部其它信息","baidu_search_headlth_shield_other_info",!0),E("【屏蔽】底部工具栏","baidu_search_headlth_shield_bottom_toolbar",!0)]},{text:"userAgent包含SearchCraft时",type:"forms",forms:[E("自动点击翻页","baidu_search_automatically_click_on_the_next_page_with_searchcraft_ua",!1,function(e,t){if(t&&y.getValue("baidu_search_automatically_expand_next_page")){let r=document.querySelector(`li[${y.$data.attributeKeyName}="baidu_search_automatically_expand_next_page"] span.pops-panel-switch__core`);if(!r)throw new Error("未找到互斥元素");r.click();}},"与【功能-自动翻页】冲突")]},{text:"屏蔽/禁止",type:"forms",forms:[E("【屏蔽】大家还在搜","baidu_search_blocking_everyone_is_still_searching",!0,void 0,"用于补充下面自定义拦截规则的默认配置的【大家还在搜】")]},{text:"功能",type:"forms",forms:[E("处理搜索结果","baidu_search_handle_search_result",!0,void 0,"将百度重定向链接替换为真实地址(存在就替换,不存在的话保持原样)"),E("重定向顶部的链接","baidu_search_redirect_top_link",!0,void 0,"如全部、视频、图片、贴吧、咨询..."),E("重构百度搜索","baidu_search_refactoring_input_boxes",!0,void 0,"重构顶部的输入框、百度一下按钮、搜索建议框,可不出现百度App提示"),E("自动翻页","baidu_search_automatically_expand_next_page",!1,function(e,t){if(t&&y.getValue("baidu_search_automatically_click_on_the_next_page_with_searchcraft_ua")){let r=document.querySelector(`li[${y.$data.attributeKeyName}="baidu_search_automatically_click_on_the_next_page_with_searchcraft_ua"] span.pops-panel-switch__core`);if(!r)throw new Error("未找到互斥元素");r.click();}},"与上面的【自动点击翻页】冲突"),E("同步地址","baidu_search_sync_next_page_address",!1,function(e,t){t&&alert("开启后,且开启【自动翻页】,当自动加载到第N页时,浏览器地址也会跟随改变,刷新网页就是当前加载的第N页");},"地址同步自动翻页的地址"),E("【优化】大家还在搜","baidu_search_refactor_everyone_is_still_searching",!0,void 0,"正确新标签页打开"),E("【beta】新标签页打开","baidu_search_hijack__onClick_to_blank",!1,void 0,"实验性功能,需开启【劫持-_onClick函数】和【处理搜索结果】且能成功劫持到该函数才会生效,否则是粗糙的提取article的链接跳转")]},{text:"劫持/拦截",type:"forms",forms:[E("劫持-define函数","baidu_search_hijack_define",!1,void 0,"开启后将禁止原有的define"),E("劫持-复制","baidu_search_hijack_copy",!1,void 0,"阻止百度复制xxx到剪贴板"),E("劫持-Scheme唤醒App","baidu_search_hijack_scheme",!1,void 0,"阻止唤醒调用App"),E("劫持-OpenBox函数","baidu_search_hijack_openbox",!1,void 0,"优化搜索结果跳转"),E("劫持-_onClick函数","baidu_search_hijack__onClick",!1,void 0,"优化搜索结果跳转"),E("劫持-setTimeout","baidu_search_hijack_setTimeout",!1,void 0,"可阻止获取定位、视频播放")]},{text:"自定义拦截规则
查看规则文档(在最下面)
点击重置",type:"forms",forms:[E("启用默认拦截规则","baidu-search-enable-default-interception-rules",!0,void 0,"默认拦截规则"),{type:"own",afterAddToUListCallBack(e,t){var n;let r=(n=t==null?void 0:t.formHeaderDivElement)==null?void 0:n.querySelector("a.baidu-search-shield-css-reset");v.on(r,"click",void 0,()=>{Et.clearLocalRule();let a=t.ulElement.querySelector("textarea");a.value="",se.success("已重置");});},getLiElementCallBack(e){let t=v.createElement("div",{className:"pops-panel-textarea baidu-search-interception-rule",innerHTML:` +`+e),this.rule=this.parseRule(e);},getLocalRule(){let e=_.getValue("baidu-search-interception-rules","");return e=e.trim(),e},setLocalRule(e){_.setValue("baidu-search-interception-rules",e);},clearLocalRule(){_.deleteValue("baidu-search-interception-rules");},parseRule(e){let t=[];function r(n){let a=n.split("##");if(!a.length){o.error(["无效规则",n]);return}let i=a[0],s=i.toLowerCase(),l=n.replace(i+"##","");if(s==="match-href")return {rule:n,mode:s,matchText:new RegExp(l)};if(s==="match-attr"){let c=l.split("##");if(c.length===1){o.error(["无效规则",n]);return}let u=c[0],f=l.replace(u+"##","");return {rule:n,mode:s,attr:u,matchText:new RegExp(f)}}else {if(s==="contains-child"||s==="remove-child")return {rule:n,mode:s,matchText:l};o.error(["无效规则",n]);}}return e.split(` +`).forEach(n=>{if(n=n.trim(),n===""||n.startsWith("//"))return;let a=n.split("&&&&");if(a.length===1){let i=r(n);i&&t.push(i);}else {let i=[];a.forEach(s=>{s=s.trim();let l=r(s);l&&i.push(l);}),t.push({mode:"more-rule",moreRule:i});}}),t},handleCustomRule(e,t){function r(n){var a,i;if(n.mode==="match-href"){if(typeof t=="string"&&t.match(n.matchText))return !0}else if(n.mode==="match-attr"){if(e.hasAttribute(n.attr)&&((a=e.getAttribute(n.attr))!=null&&a.match(n.matchText)))return !0}else if(n.mode==="contains-child"){if(e.querySelector(n.matchText))return !0}else n.mode==="remove-child"&&((i=e.querySelector(n.matchText))==null||i.remove());}for(const n of this.rule)if(n.moreRule){for(const a of n.moreRule)if(r(a))return !0}else if(r(n))return !0}},E=function(e,t,r,n,a){let i={text:e,type:"switch",description:a,attributes:{},getValue(){return !!_.getValue(t,r)},callback(s,l){o.success(`${l?"开启":"关闭"} ${e}`),!(typeof n=="function"&&n(s,l))&&_.setValue(t,!!l);},afterAddToUListCallBack:void 0};return i.attributes&&(i.attributes[Sr]=t,i.attributes[kr]=!!r),i},xi={id:"baidu-panel-config-search",title:"搜索",headerTitle:"百度搜索
m.baidu.com
www.baidu.com",isDefault(){return Y.isSearch()||Y.isSearchHome()||Y.isSearchBh()},forms:[{text:"主页",type:"forms",forms:[E("精简主页","baidu_search_home_homepage_minification",!0)]},{text:"百度健康(快速问医生)",type:"forms",forms:[E("【屏蔽】底部其它信息","baidu_search_headlth_shield_other_info",!0),E("【屏蔽】底部工具栏","baidu_search_headlth_shield_bottom_toolbar",!0)]},{text:"userAgent包含SearchCraft时",type:"forms",forms:[E("自动点击翻页","baidu_search_automatically_click_on_the_next_page_with_searchcraft_ua",!1,function(e,t){if(t&&_.getValue("baidu_search_automatically_expand_next_page")){let r=document.querySelector(`li[${_.$data.attributeKeyName}="baidu_search_automatically_expand_next_page"] span.pops-panel-switch__core`);if(!r)throw new Error("未找到互斥元素");r.click();}},"与【功能-自动翻页】冲突")]},{text:"屏蔽/禁止",type:"forms",forms:[E("【屏蔽】大家还在搜","baidu_search_blocking_everyone_is_still_searching",!0,void 0,"用于补充下面自定义拦截规则的默认配置的【大家还在搜】")]},{text:"功能",type:"forms",forms:[E("处理搜索结果","baidu_search_handle_search_result",!0,void 0,"将百度重定向链接替换为真实地址(存在就替换,不存在的话保持原样)"),E("重定向顶部的链接","baidu_search_redirect_top_link",!0,void 0,"如全部、视频、图片、贴吧、咨询..."),E("重构百度搜索","baidu_search_refactoring_input_boxes",!0,void 0,"重构顶部的输入框、百度一下按钮、搜索建议框,可不出现百度App提示"),E("自动翻页","baidu_search_automatically_expand_next_page",!0,function(e,t){if(t&&_.getValue("baidu_search_automatically_click_on_the_next_page_with_searchcraft_ua")){let r=document.querySelector(`li[${_.$data.attributeKeyName}="baidu_search_automatically_click_on_the_next_page_with_searchcraft_ua"] span.pops-panel-switch__core`);if(!r)throw new Error("未找到互斥元素");r.click();}},"与上面的【自动点击翻页】冲突"),E("同步地址","baidu_search_sync_next_page_address",!1,function(e,t){t&&alert("开启后,且开启【自动翻页】,当自动加载到第N页时,浏览器地址也会跟随改变,刷新网页就是当前加载的第N页");},"地址同步自动翻页的地址"),E("【优化】大家还在搜","baidu_search_refactor_everyone_is_still_searching",!0,void 0,"正确新标签页打开"),E("【beta】新标签页打开","baidu_search_hijack__onClick_to_blank",!0,void 0,"实验性功能,需开启【劫持-_onClick函数】和【处理搜索结果】且能成功劫持到该函数才会生效,否则是粗糙的提取article的链接跳转")]},{text:"劫持/拦截",type:"forms",forms:[E("劫持-define函数","baidu_search_hijack_define",!1,void 0,"开启后将禁止原有的define"),E("劫持-复制","baidu_search_hijack_copy",!0,void 0,"阻止百度复制xxx到剪贴板"),E("劫持-Scheme唤醒App","baidu_search_hijack_scheme",!0,void 0,"阻止唤醒调用App"),E("劫持-OpenBox函数","baidu_search_hijack_openbox",!0,void 0,"优化搜索结果跳转"),E("劫持-_onClick函数","baidu_search_hijack__onClick",!0,void 0,"优化搜索结果跳转"),E("劫持-setTimeout","baidu_search_hijack_setTimeout",!0,void 0,"可阻止获取定位、视频播放")]},{text:"自定义拦截规则
查看规则文档(在最下面)
点击重置",type:"forms",forms:[E("启用默认拦截规则","baidu-search-enable-default-interception-rules",!0,void 0,"默认拦截规则"),{type:"own",afterAddToUListCallBack(e,t){var n;let r=(n=t==null?void 0:t.formHeaderDivElement)==null?void 0:n.querySelector("a.baidu-search-shield-css-reset");v.on(r,"click",void 0,()=>{Et.clearLocalRule();let a=t.ulElement.querySelector("textarea");a.value="",se.success("已重置");});},getLiElementCallBack(e){let t=v.createElement("div",{className:"pops-panel-textarea baidu-search-interception-rule",innerHTML:` - `}),r=t.querySelector("textarea");return r.value=y.getValue("baidu-search-user-style",""),e.appendChild(t),v.on(r,["input","propertychange"],void 0,p.debounce(function(){y.setValue("baidu-search-user-style",r.value);},100)),e}}]}]},Si={id:"baidu-panel-config-baijiahao",title:"百家号",headerTitle:"百家号
baijiahao.baidu.com
mbd.baidu.com",isDefault(){return Y.isBaiJiaHao()||Y.isMbd()},scrollToDefaultView:!0,forms:[{text:"百家号(baijiahao)👇",type:"forms",forms:[]},{text:"屏蔽",type:"forms",forms:[E("【屏蔽】推荐文章","baijiahao_shield_recommended_article",!0),E("【屏蔽】用户评论","baijiahao_shield_user_comment",!1),E("【屏蔽】底部悬浮工具栏","baijiahao_shield_user_comment_input_box",!1)]},{text:"劫持/拦截",type:"forms",forms:[E("劫持-唤醒App","baijiahao_hijack_wakeup",!1,void 0,"阻止唤醒调用App"),E("劫持-iframe唤醒App","baidu_baijiahao_hijack_iframe",!0,void 0,"阻止唤醒调用App"),E("劫持-OpenBox函数","baidu_baijiahao_hijack_openbox",!1)]},{text:"百家号(mbd)👇",type:"forms",forms:[]},{text:"屏蔽",type:"forms",forms:[E("【屏蔽】精彩评论","baidu_mbd_block_exciting_comments",!1),E("【屏蔽】精彩推荐","baidu_mbd_block_exciting_recommendations",!1),E("【屏蔽】底部工具栏","baidu_mbd_shield_bottom_toolbar",!1)]},{text:"功能",type:"forms",forms:[E("伪装成lite baiduboxapp","baidu_mbd_camouflage_lite_baiduboxapp",!0,void 0,"可以优化浏览体验")]},{text:"劫持/拦截",type:"forms",forms:[E("拦截-唤醒App","baidu_mbd_hijack_wakeup",!1,void 0,"阻止唤醒调用App"),E("拦截-iframe唤醒App","baidu_mbd_hijack_iframe",!0,void 0,"阻止唤醒调用App"),E("劫持-BoxJSBefore函数","baidu_mbd_hijack_BoxJSBefore",!1,void 0,"阻止唤醒调用App")]}]},le={getVue(e){if(e!=null)return e.__vue__||e.__Ivue__||e.__IVue__}},We={async getUserHomeInfo(e){let t="";if(e.un)t=`un=${e.un}`;else if(e.portrait)t=`portrait=${e.portrait}`;else throw new TypeError("userInfo.un|userInfo.portrait is undefined");let r=await ge.get(`https://tieba.baidu.com/home/get/panel?ie=utf-8&${t}`,{headers:{"User-Agent":p.getRandomPCUA(),Host:"tieba.baidu.com",Referer:"https://tieba.baidu.com/"}});if(!r.status)return;let n=p.toJSON(r.data.responseText);if(n.no===0)return n.data},async getUserPosts(e,t=1){let r=await ge.get(`https://tieba.baidu.com/home/post?un=${e}&is_ajax=1&lp=&pn=${t}`,{fetch:!0,headers:{"User-Agent":p.getRandomPCUA()}});if(!r.status)return;let n=p.toJSON(r.data.responseText);if(n.no!=0||p.isNull(n.data.content))return;let a={has_more:!!n.data.page.has_more,data:[]},i=v.parseHTML(n.data.content,!0,!0);return Array.from(i.querySelectorAll(".list_item")).forEach(o=>{let l={url:o.querySelector("a.list_item_link").href,title:o.querySelector(".post_list_item_title").innerHTML,content:o.querySelector(".post_abstract_text").innerHTML,forumName:o.querySelector(".post_list_item_info_forum").innerText.replace(/吧$/,""),createTime:o.querySelector(".post_list_item_info_time").innerText,replyNum:parseInt(o.querySelector(".post_item_info_reply_icon").innerText),mediaList:[]};isNaN(l.replyNum)&&(l.replyNum=0),o.querySelector(".thread_body_media")&&l.mediaList.concat(Array.from(o.querySelectorAll(".thread_body_media img")).map(c=>c.src)),a.data.push(l);}),a},async getUserJSON(e){e=new p.GBKEncoder().encode(e);let r=await ge.get(`https://tieba.baidu.com/i/sys/user_json?un=${e}`,{headers:{"User-Agent":p.getRandomPCUA(),Host:"tieba.baidu.com",Referer:"https://tieba.baidu.com/"}});return r.status?p.toJSON(r.data.responseText):void 0},async getChatUserInfo(e){let t=await ge.get(`http://tieba.baidu.com/im/pcmsg/query/getUserInfo?chatUid=${e}`,{headers:{"User-Agent":p.getRandomPCUA(),Host:"tieba.baidu.com",Referer:"https://tieba.baidu.com/"}});if(!t.status)return;let r=p.toJSON(t.data.responseText);if(r.errno===0)return r.chatUser},async forumSign(e,t){s.success(["发送签到请求→",e,t]);let r=await ge.post("https://tieba.baidu.com/sign/add",{data:`ie=utf-8&kw=${e}&tbs=${t}`,responseType:"json",headers:{Accept:"application/json, text/javascript, */*; q=0.01","Content-Type":"application/x-www-form-urlencoded; charset=UTF-8",Host:"tieba.baidu.com",Origin:"https://tieba.baidu.com","User-Agent":p.getRandomPCUA(),Referer:"https://tieba.baidu.com/p/","X-Requested-With":"XMLHttpRequest"}});if(s.success(r),!r.status)return;let n=p.toJSON(r.data.responseText);return s.success(n),n},async getUserAllLikeForum(){let e=await ge.get("https://tieba.baidu.com/mo/q/sug?query=&is_ajax=1&sug=1",{headers:{Accept:"application/json",Host:"tieba.baidu.com",Referer:"https://tieba.baidu.com/i/i/forum","User-Agent":p.getRandomAndroidUA()}});if(s.success(e),!e.status)return;let t=p.toJSON(e.data.responseText);return s.success(t),t.data.like_forum},async getForumTbs(e){let t=await ge.get(`https://tieba.baidu.com/f?kw=${e}&ie=utf-8`,{headers:{Host:"tieba.baidu.com",Referer:`https://tieba.baidu.com/f?kw=${e}&ie=utf-8`}});if(!t.status)return;let r=t.data.responseText.match(/var[\s]*PageData[\s\S]*'tbs'.*"(.+)"/);if(r)return r[1]},async getPictureGuide(e,t,r=0,n=0,a="jview",i=1e3,o=1e3){let l=await ge.get(`https://tieba.baidu.com/photo/bw/picture/guide?kw=${e}&tid=${t}&see_lz=${r}&from_page=${n}&alt=${a}&next=${i}&prev=${o}&_=${Date.now()}`,{headers:{Accept:"*/*",Host:"tieba.baidu.com","User-Agent":p.getRandomPCUA()},responseType:"json"});if(!l.status)return;let c=p.toJSON(l.data.responseText);if(c.no===0||c.error==="sucess!")return c.data}},Be={getUserAvatar(e){return `https://gss0.bdstatic.com/6LZ1dD3d1sgCo2Kml5_Y_D3/sys/portrait/item/${e}`},getPost(e){return `https://tieba.baidu.com/p/${e}`},getHybridSearch(e){return `https://tieba.baidu.com/mo/q/hybrid/search?keyword=${e}`},getImageSmiley(e){return e.startsWith("/")&&(e=e.replace(/^\//,"")),`https://gsp0.baidu.com/5aAHeD3nKhI2p27j8IqW0jdnxx1xbK/${e}`},getForum(e){return "https://tieba.baidu.com/f?kw="+e}},Ot={getForumId(){var r,n,a;let e=(r=document.querySelector(".recommend-item"))==null?void 0:r.getAttribute("data-banner-info"),t=p.toJSON(e);return t.forum_id?t.forum_id:(a=(n=le.getVue(document.querySelector(".app-view")))==null?void 0:n.forum)==null?void 0:a.id}},ki=function(e,t,r,n,a,i,o,l){return {text:e,type:"button",description:t,buttonIcon:n,buttonIsRightIcon:a,buttonIconIsLoading:i,buttonType:o,buttonText:r,callback(u){typeof l=="function"&&l(u);},afterAddToUListCallBack:void 0}},Ti={id:"baidu-panel-config-tieba",title:"贴吧",headerTitle:"百度贴吧
tieba.baidu.com
www.tieba.com
...等",isDefault(){return Y.isTieBa()},scrollToDefaultView:!0,forms:[{text:"账号功能",type:"forms",forms:[ki("签到所有关注的吧",void 0,"签到",void 0,void 0,!1,"default",async()=>{function e(a,i,o,l,c){return ` + `}),r=t.querySelector("textarea");return r.value=_.getValue("baidu-search-user-style",""),e.appendChild(t),v.on(r,["input","propertychange"],void 0,p.debounce(function(){_.setValue("baidu-search-user-style",r.value);},100)),e}}]}]},Si={id:"baidu-panel-config-baijiahao",title:"百家号",headerTitle:"百家号
baijiahao.baidu.com
mbd.baidu.com",isDefault(){return Y.isBaiJiaHao()||Y.isMbd()},scrollToDefaultView:!0,forms:[{text:"百家号(baijiahao)👇",type:"forms",forms:[]},{text:"屏蔽",type:"forms",forms:[E("【屏蔽】推荐文章","baijiahao_shield_recommended_article",!0),E("【屏蔽】用户评论","baijiahao_shield_user_comment",!1),E("【屏蔽】底部悬浮工具栏","baijiahao_shield_user_comment_input_box",!1)]},{text:"劫持/拦截",type:"forms",forms:[E("劫持-唤醒App","baijiahao_hijack_wakeup",!0,void 0,"阻止唤醒调用App"),E("劫持-iframe唤醒App","baidu_baijiahao_hijack_iframe",!0,void 0,"阻止唤醒调用App"),E("劫持-OpenBox函数","baidu_baijiahao_hijack_openbox",!0)]},{text:"百家号(mbd)👇",type:"forms",forms:[]},{text:"屏蔽",type:"forms",forms:[E("【屏蔽】精彩评论","baidu_mbd_block_exciting_comments",!1),E("【屏蔽】精彩推荐","baidu_mbd_block_exciting_recommendations",!1),E("【屏蔽】底部工具栏","baidu_mbd_shield_bottom_toolbar",!1)]},{text:"功能",type:"forms",forms:[E("伪装成lite baiduboxapp","baidu_mbd_camouflage_lite_baiduboxapp",!0,void 0,"可以优化浏览体验")]},{text:"劫持/拦截",type:"forms",forms:[E("拦截-唤醒App","baidu_mbd_hijack_wakeup",!0,void 0,"阻止唤醒调用App"),E("拦截-iframe唤醒App","baidu_mbd_hijack_iframe",!0,void 0,"阻止唤醒调用App"),E("劫持-BoxJSBefore函数","baidu_mbd_hijack_BoxJSBefore",!0,void 0,"阻止唤醒调用App")]}]},le={getVue(e){if(e!=null)return e.__vue__||e.__Ivue__||e.__IVue__}},We={async getUserHomeInfo(e){let t="";if(e.un)t=`un=${e.un}`;else if(e.portrait)t=`portrait=${e.portrait}`;else throw new TypeError("userInfo.un|userInfo.portrait is undefined");let r=await ge.get(`https://tieba.baidu.com/home/get/panel?ie=utf-8&${t}`,{headers:{"User-Agent":p.getRandomPCUA(),Host:"tieba.baidu.com",Referer:"https://tieba.baidu.com/"}});if(!r.status)return;let n=p.toJSON(r.data.responseText);if(n.no===0)return n.data},async getUserPosts(e,t=1){let r=await ge.get(`https://tieba.baidu.com/home/post?un=${e}&is_ajax=1&lp=&pn=${t}`,{fetch:!0,headers:{"User-Agent":p.getRandomPCUA()}});if(!r.status)return;let n=p.toJSON(r.data.responseText);if(n.no!=0||p.isNull(n.data.content))return;let a={has_more:!!n.data.page.has_more,data:[]},i=v.parseHTML(n.data.content,!0,!0);return Array.from(i.querySelectorAll(".list_item")).forEach(s=>{let l={url:s.querySelector("a.list_item_link").href,title:s.querySelector(".post_list_item_title").innerHTML,content:s.querySelector(".post_abstract_text").innerHTML,forumName:s.querySelector(".post_list_item_info_forum").innerText.replace(/吧$/,""),createTime:s.querySelector(".post_list_item_info_time").innerText,replyNum:parseInt(s.querySelector(".post_item_info_reply_icon").innerText),mediaList:[]};isNaN(l.replyNum)&&(l.replyNum=0),s.querySelector(".thread_body_media")&&l.mediaList.concat(Array.from(s.querySelectorAll(".thread_body_media img")).map(c=>c.src)),a.data.push(l);}),a},async getUserJSON(e){e=new p.GBKEncoder().encode(e);let r=await ge.get(`https://tieba.baidu.com/i/sys/user_json?un=${e}`,{headers:{"User-Agent":p.getRandomPCUA(),Host:"tieba.baidu.com",Referer:"https://tieba.baidu.com/"}});return r.status?p.toJSON(r.data.responseText):void 0},async getChatUserInfo(e){let t=await ge.get(`http://tieba.baidu.com/im/pcmsg/query/getUserInfo?chatUid=${e}`,{headers:{"User-Agent":p.getRandomPCUA(),Host:"tieba.baidu.com",Referer:"https://tieba.baidu.com/"}});if(!t.status)return;let r=p.toJSON(t.data.responseText);if(r.errno===0)return r.chatUser},async forumSign(e,t){o.success(["发送签到请求→",e,t]);let r=await ge.post("https://tieba.baidu.com/sign/add",{data:`ie=utf-8&kw=${e}&tbs=${t}`,responseType:"json",headers:{Accept:"application/json, text/javascript, */*; q=0.01","Content-Type":"application/x-www-form-urlencoded; charset=UTF-8",Host:"tieba.baidu.com",Origin:"https://tieba.baidu.com","User-Agent":p.getRandomPCUA(),Referer:"https://tieba.baidu.com/p/","X-Requested-With":"XMLHttpRequest"}});if(o.success(r),!r.status)return;let n=p.toJSON(r.data.responseText);return o.success(n),n},async getUserAllLikeForum(){let e=await ge.get("https://tieba.baidu.com/mo/q/sug?query=&is_ajax=1&sug=1",{headers:{Accept:"application/json",Host:"tieba.baidu.com",Referer:"https://tieba.baidu.com/i/i/forum","User-Agent":p.getRandomAndroidUA()}});if(o.success(e),!e.status)return;let t=p.toJSON(e.data.responseText);return o.success(t),t.data.like_forum},async getForumTbs(e){let t=await ge.get(`https://tieba.baidu.com/f?kw=${e}&ie=utf-8`,{headers:{Host:"tieba.baidu.com",Referer:`https://tieba.baidu.com/f?kw=${e}&ie=utf-8`}});if(!t.status)return;let r=t.data.responseText.match(/var[\s]*PageData[\s\S]*'tbs'.*"(.+)"/);if(r)return r[1]},async getPictureGuide(e,t,r=0,n=0,a="jview",i=1e3,s=1e3){let l=await ge.get(`https://tieba.baidu.com/photo/bw/picture/guide?kw=${e}&tid=${t}&see_lz=${r}&from_page=${n}&alt=${a}&next=${i}&prev=${s}&_=${Date.now()}`,{headers:{Accept:"*/*",Host:"tieba.baidu.com","User-Agent":p.getRandomPCUA()},responseType:"json"});if(!l.status)return;let c=p.toJSON(l.data.responseText);if(c.no===0||c.error==="sucess!")return c.data}},Pe={getUserAvatar(e){return `https://gss0.bdstatic.com/6LZ1dD3d1sgCo2Kml5_Y_D3/sys/portrait/item/${e}`},getPost(e){return `https://tieba.baidu.com/p/${e}`},getHybridSearch(e){return `https://tieba.baidu.com/mo/q/hybrid/search?keyword=${e}`},getImageSmiley(e){return e.startsWith("/")&&(e=e.replace(/^\//,"")),`https://gsp0.baidu.com/5aAHeD3nKhI2p27j8IqW0jdnxx1xbK/${e}`},getForum(e){return "https://tieba.baidu.com/f?kw="+e}},Ot={getForumId(){var r,n,a;let e=(r=document.querySelector(".recommend-item"))==null?void 0:r.getAttribute("data-banner-info"),t=p.toJSON(e);return t.forum_id?t.forum_id:(a=(n=le.getVue(document.querySelector(".app-view")))==null?void 0:n.forum)==null?void 0:a.id}},ki=function(e,t,r,n,a,i,s,l){return {text:e,type:"button",description:t,buttonIcon:n,buttonIsRightIcon:a,buttonIconIsLoading:i,buttonType:s,buttonText:r,callback(u){typeof l=="function"&&l(u);},afterAddToUListCallBack:void 0}},Ti={id:"baidu-panel-config-tieba",title:"贴吧",headerTitle:"百度贴吧
tieba.baidu.com
www.tieba.com
...等",isDefault(){return Y.isTieBa()},scrollToDefaultView:!0,forms:[{text:"账号功能",type:"forms",forms:[ki("签到所有关注的吧",void 0,"签到",void 0,void 0,!1,"default",async()=>{function e(a,i,s,l,c){return `
进度:${a}/${i}
-
吧名:${o}
+
吧名:${s}
信息:${l}
- `}se.info("正在获取所有关注吧");let t=await We.getUserAllLikeForum();if(!t)return;if(!t.length){se.error("该账号尚未关注帖子");return}let r=!1,n=se.loading(e(1,t.length,t[0].forum_name,"正在获取tbs"),{showClose:!0,onClose(){r=!0;}});for(let a=0;a ${o}`),n.setHTML(e(a+1,t.length,i.forum_name,"发送签到请求..."));let l=await We.forumSign(i.forum_name,o);if(!l){se.info("2秒后切换至下一个"),await p.sleep(2e3);continue}typeof l.data=="object"?n.setHTML(e(a+1,t.length,i.forum_name,`今日本吧第${l.data.finfo.current_rank_info.sign_count}个签到`)):se.error(l.error),se.info("2秒后切换至下一个"),await p.sleep(2e3);}se.success(`执行签到 ${t.length} 个贴吧完毕`),n.close();})]},{text:"通用",type:"forms",forms:[E("检测骨架屏","baidu_tieba_checkSkeleton",!0,void 0,"当页面加载完毕后检测到还是骨架屏,将会自动刷新页面"),E("自动重定向至主域名","baidu_tieba_autoJumpToMainHost",!1,void 0,"域名为nba.baidu.com、static.tieba.baidu.com...等时自动重定向至tieba.baidu.com")]},{text:"搜索功能",type:"forms",forms:[E("启用","baidu_tieba_add_search",!0,void 0,"在贴内和吧内右上角添加搜索按钮"),E("获取详细信息","baidu_tieba_search_opt_user_info",!0,void 0,"将搜索结果的【用户名/头像】替换成请求获取的【用户名/头像】"),E("使用【搜索综合】","baidu_tieba_use_hybrid_search",!1,void 0,"使用贴吧移动端的搜索功能")]},{text:"首页",type:"forms",forms:[E("新标签页打开","baidu_tieba_index_openANewTab",!1,void 0,"新标签页打开帖子")]},{text:"话题热议",type:"forms",forms:[E("重定向xx吧跳转","baidu_tieba_topic_redirect_jump",!0,void 0,"点击帖子直接跳转"),E("新标签页打开","baidu_tieba_topic_openANewTab",!1,void 0,"新标签页打开帖子")]},{text:"搜索综合",type:"forms",forms:[E("新标签页打开","baidu_tieba_hybrid_search_openANewTab",!1,void 0,"新标签页打开帖子")]},{text:"吧内功能",type:"forms",forms:[E("记住当前选择的看帖排序","baidu_tieba_remember_user_post_sort",!0,void 0,"记住选择的发布/回复"),E("过滤重复帖子","baidu_tieba_filterDuplicatePosts",!1,void 0,"过滤掉重复id的帖"),E("解除签到限制","baidu_tieba_removeForumSignInLimit",!0,void 0,"在登录情况下可点击签到"),E("新标签页打开","baidu_tieba_openANewTab",!1,void 0,"新标签页打开帖子")]},{text:"帖内功能",type:"forms",forms:[E("楼中楼回复弹窗后退手势优化","baidu_tieba_lzl_ban_global_back",!1,function(e,t){t&&alert("开启后,当在手机浏览器中使用屏幕左滑回退网页操作或者点击浏览器的回退到上一页按钮,不会触发回退上一页操作,而是会关闭当前查看的楼中楼的弹窗。注:某些浏览器不适用");},"使浏览器后退变成关闭楼中楼弹窗"),E("新增滚动到顶部按钮","baidu_tieba_add_scroll_top_button_in_forum",!0,void 0,"向下滚动的距离>页面高度*2就会出现按钮"),E("优化查看评论","baidu_tieba_optimize_see_comments",!0,void 0,"可以查看更多的评论"),E("优化图片点击预览","baidu_tieba_optimize_image_preview",!0,void 0,"使用Viewer查看图片"),E("强制查看被屏蔽的帖子","baidu_tieba_repairErrorThread",!1,function(e,t){t&&window.alert("开启后,如果查看的帖子显示【贴子不存在或者已被删除】,且该帖子在PC端可以查看,那么该修复可以生效。");},"PC端可以查看帖子该功能才能正确生效"),E("点击楼主头像正确跳转主页","baidu_tieba_clickOnTheOwnerSAvatarToCorrectlyRedirectToTheHomepage",!0,void 0,"点击头像正确跳转至用户主页"),E("屏蔽机器人","baidu_tieba_shield_commnets_baodating",!0,void 0,"屏蔽【贴吧包打听】机器人,回答的评论都是牛头不对马嘴的"),E("显示用户当前吧的等级头衔","baidu_tieba_show_forum_level",!0,void 0,"只对评论和楼中楼的用户进行显示处理"),E("实验性-请求携带Cookie","baidu_tieba_request_with_cookie",!1,void 0,"非浏览器插件使用")]},{text:"劫持/拦截",type:"forms",forms:[E("劫持-唤醒App","baidu_tieba_hijack_wake_up",!1,void 0,"阻止唤醒调用App"),E("伪装客户端已调用","baidu_tieba_clientCallMasquerade",!0,void 0,"阻止弹窗")]}]},Ai={id:"baidu-panel-config-wenku",title:"文库",headerTitle:"百度文库
wk.baidu.com
tanbi.baidu.com",isDefault:Y.isWenKu,scrollToDefaultView:!0,forms:[{text:"屏蔽",type:"forms",forms:[E("【屏蔽】会员精选","baidu_wenku_block_member_picks",!0),E("【屏蔽】APP精选","baidu_wenku_blocking_app_featured",!0),E("【屏蔽】相关文档","baidu_wenku_blocking_related_documents",!1),E("【屏蔽】底部工具栏","baidu_wenku_blocking_bottom_toolbar",!1),E("【屏蔽】下一篇按钮","baidu_wenku_shield_next_btn",!1),E("【屏蔽】文档助手","baidu_wenku_blockDocumentAssistant",!1,void 0,"右下角的悬浮按钮")]}]},Ci={id:"baidu-panel-config-jingyan",title:"经验",headerTitle:"百度经验
jingyan.baidu.com",isDefault(){return Y.isJingYan()},scrollToDefaultView:!0,forms:[]},Ei={id:"baidu-panel-config-baike",title:"百科",headerTitle:"百度百科
baike.baidu.com
wapbaike.baidu.com",isDefault(){return Y.isBaiKe()},scrollToDefaultView:!0,forms:[{text:"劫持Box",type:"forms",forms:[E("isBox","baidu-baike-Box-isBox",!0,void 0,"Box.isBox和Box.$isBox强制返回true"),E("isLiteBox","baidu-baike-Box-isLiteBox",!1,void 0,"Box.isLiteBox和Box.$isLiteBox强制返回true"),E("isInfoBox","baidu-baike-Box-isInfoBox",!1,void 0,"Box.isInfoBox和Box.$isInfoBox强制返回true"),E("isIOS","baidu-baike-Box-isIOS",!1,void 0,"Box.isIOS和Box.$isIOS强制返回true"),E("isAndroid","baidu-baike-Box-isAndroid",!1,void 0,"Box.isAndroid和Box.$isAndroid强制返回true"),E("android.invokeApp","baidu-baike-Box-android.invokeApp",!0,void 0,"Box.android.invokeApp()置空"),E("android.invokeLiteApp","baidu-baike-Box-android.invokeLiteApp",!0,void 0,"Box.android.invokeLiteApp()置空"),E("ios.invokeApp","baidu-baike-Box-ios.invokeApp",!0,void 0,"Box.ios.invokeApp()置空")]},{text:"他说(/tashuo)",type:"forms",forms:[E("【屏蔽】底部广告","baidu_baike_tashuo_remove_bottom_ad",!0)]}]},Bi={id:"baidu-panel-config-zhidao",title:"知道",headerTitle:"百度知道
zhidao.baidu.com",isDefault(){return Y.isZhiDao()},scrollToDefaultView:!0,forms:[{text:"屏蔽",type:"forms",forms:[E("【屏蔽】推荐更多精彩内容","baidu_zhidao_block_recommend_more_exciting_content",!0),E("【屏蔽】相关问题","baidu_zhidao_block_related_issues",!0),E("【屏蔽】其他回答","baidu_zhidao_block_other_answers",!1),E("【屏蔽】顶部浮动工具栏","baidu_zhidao_shield_top_fixed_toolbar",!1)]}]},Li={id:"baidu-panel-config-fanyi",title:"翻译",headerTitle:"百度翻译
fanyi.baidu.com
fanyi-app.baidu.com",isDefault(){return Y.isFanYi()||Y.isFanYiApp()},scrollToDefaultView:!0,forms:[{text:"屏蔽",type:"forms",forms:[E("【屏蔽】底部推荐","baidu_fanyi_recommended_shielding_bottom",!0),E("【屏蔽】底部其它","baidu_fanyi_other_shielding_bottom",!0)]},{text:"功能",type:"forms",forms:[E("自动聚焦输入框","baidu_fanyi_auto_focus",!0)]},{text:"App(fanyi-app)",type:"forms",forms:[E("【屏蔽】专栏信息","baidu_fanyi_app_shield_column_information",!1),E("【屏蔽】为你推荐","baidu_fanyi_app_shield_recommended_for_you",!1),E("【屏蔽】我要跟读","baidu_fanyi_app_shield_i_need_to_follow_along",!1)]}]},Pi={id:"baidu-panel-config-image",title:"图片",headerTitle:"百度经验
image.baidu.com",isDefault(){return Y.isJingYan()},scrollToDefaultView:!0,forms:[]},Mi={id:"baidu-panel-config-map",title:"地图",headerTitle:"百度地图
map.baidu.com",isDefault(){return Y.isMap()},scrollToDefaultView:!0,forms:[{text:"劫持/拦截",type:"forms",forms:[E("拦截-唤醒App","baidu_map_hijack_wakeup",!1,void 0,"阻止唤醒调用App")]}]},Ni={id:"baidu-panel-config-xue",title:"知了好学",headerTitle:"知了好学
xue.baidu.com",isDefault(){return Y.isJingYan()},scrollToDefaultView:!0,forms:[]},Ii={id:"baidu-panel-config-aiqicha",title:"爱企查",headerTitle:"爱企查
aiqicha.baidu.com",isDefault(){return Y.isAiQiCha()},scrollToDefaultView:!0,forms:[{text:"屏蔽",type:"forms",forms:[E("【屏蔽】轮播图","baidu_aiqicha_shield_carousel",!0),E("【屏蔽】行业热点新闻","baidu_aiqicha_shield_industry_host_news",!0)]}]},Ri={id:"baidu-panel-config-pos",title:"网盟",headerTitle:"百度网盟推广
pos.baidu.com",isDefault(){return Y.isPos()},scrollToDefaultView:!0,forms:[]},$i={id:"baidu-panel-config-haokan",title:"好看视频",headerTitle:"好看视频
haokan.baidu.com",isDefault(){return Y.isHaoKan()},scrollToDefaultView:!0,forms:[{text:"屏蔽",type:"forms",forms:[E("【屏蔽】猜你喜欢","baidu_haokan_shield_may_also_like",!0),E("【屏蔽】今日热播榜单","baidu_haokan_shield_today_s_hot_list",!0),E("【屏蔽】右侧工具栏","baidu_haokan_shield_right_video_action",!0)]},{text:"功能",type:"forms",forms:[E("播放视频自动进入全屏","baidu_haokan_play_video_and_automatically_enter_full_screen",!1)]},{text:"劫持/拦截",type:"forms",forms:[E("拦截-唤醒App","baidu_haokan_hijack_wakeup",!1,void 0,"阻止唤醒调用App")]}]},Oi={id:"baidu-panel-config-graph",title:"识图",headerTitle:"百度识图
graph.baidu.com",isDefault(){return Y.isGraph()},scrollToDefaultView:!0,forms:[{text:"功能",type:"forms",forms:[E("【重构】识图一下","baidu-graph-repairHomeRecognitionPicture",!0,void 0,"重构主页的识图一下,就可以直接点击上传图片进行搜索"),E("【重构】搜索按钮","baidu-graph-repairSearchButton",!0,void 0,"重构主页的往下滑动右下角出现的搜索图标按钮"),E("【重构】重拍","baidu-graph-repairRetakeButton",!0,void 0,"在已搜索出相关结果的界面中的重构【重拍】按钮"),E("修复搜索无结果","baidu-graph-repairSearchNoResult",!0,void 0,"如果出现识图没结果,重新识别,可能是因为后面参数多了tpl_from=pc的问题")]}]},zi={id:"baidu-panel-config-pan",title:"网盘",headerTitle:"百度网盘
pan.baidu.com",isDefault(){return Y.isPan()},scrollToDefaultView:!0,forms:[]},Di={id:"baidu-panel-config-yiyan",title:"文心一言",headerTitle:"文心一言
yiyan.baidu.com",isDefault(){return Y.isYiYan()},scrollToDefaultView:!0,forms:[{text:"屏蔽",type:"forms",forms:[E("【屏蔽】文字/图片水印","baidu_yiyan_remove_ai_mask",!0)]}]},qi={id:"baidu-panel-config-chat",title:"AI伙伴",headerTitle:"搜索AI伙伴
chat.baidu.com",isDefault(){return Y.isChat()},scrollToDefaultView:!0,forms:[{text:"屏蔽",type:"forms",forms:[E("【屏蔽】文字/图片水印","baidu_chat_remove_ai_mask",!0)]}]},Ui={id:"baidu-panel-config-easy-learn",title:"教育",headerTitle:"百度教育
easylearn.baidu.com
uf9kyh.smartapps.cn",isDefault(){return Y.isEasyLearn()||Y.isMiniJiaoYu()},scrollToDefaultView:!0,forms:[{text:"小程序",type:"forms",forms:[E("【屏蔽】底部下拉菜单","mini_baidu_jiaoyu_shield_bottom_pull_down_menu",!1)]},{text:"屏蔽",type:"forms",forms:[E("【屏蔽】本题试卷","baidu_easylearn_shield_this_question_paper",!1),E("【屏蔽】本卷好题","baidu_easylearn_shield_good_questions_in_this_volume",!1),E("【屏蔽】相关试卷","baidu_easylearn_shield_related_test_papers",!1),E("【屏蔽】视频讲解","baidu_easylearn_shield_video_explanation",!1),E("【屏蔽】学霸笔记","baidu_easylearn_shield_xueba_notes",!1),E("【屏蔽】底部工具栏","baidu_easylearn_shield_bottom_toolbar",!1)]},{text:"功能",type:"forms",forms:[E("解锁顶部搜索框","baidu_easylearn_unlocking_top_search_input",!0),E("解锁搜题上限","baidu_easylearn_unlocking_the_upper_limit_of_search_questions",!0),E("自动显示答案","baidu_easylearn_auto_show_answer",!0)]}]},Hi={id:"baidu-panel-config-ai-study",title:"知了爱学",headerTitle:"知了爱学
aistudy.baidu.com
isite.baidu.com/site/wjz2tdly",isDefault(){return Y.isAiStudy()||Y.isISite()},scrollToDefaultView:!0,forms:[{text:"知了爱学(isite)👇",type:"forms",forms:[]},{text:"屏蔽",type:"forms",forms:[E("【屏蔽】底部免费在线咨询","baidu_isite_wjz2tdly_shieldBottomBarRootContainer",!0),E("【屏蔽】右侧悬浮按钮-查看更多","baidu_isite_wjz2tdly_shieldRightSeeMoreToolBar",!1),E("【屏蔽】大家还在看","baidu_isite_wjz2tdly_shieldArticleBottom",!0)]},{text:"功能",type:"forms",forms:[E("自动展开全文","baidu_isite_wjz2tdly_autoExpandFullText",!0)]},{text:"知了爱学(aistudy)👇",type:"forms",forms:[]},{text:"屏蔽",type:"forms",forms:[E("【屏蔽】底部工具栏","baidu_ai_study_shieldBottomToolBar",!0)]},{text:"功能",type:"forms",forms:[E("自动展开全文","baidu_ai_study_autoExpandFullText",!0)]}]},ie={dialogAlias:null,isIniting:!1,isInitParams:!1,aisearch_id:null,pvId:null,sessionId:null,question:[],async init(){this.isInitParams?this.isIniting||this.showChatGPTDialog():(this.isIniting=!0,se.info("初始化参数中..."),this.isInitParams=!!await this.initParams(),this.isIniting=!1,this.isInitParams?(se.success("初始化成功!"),this.init()):se.error("初始化参数失败"));},async initParams(e=""){let t=await ge.get(`https://chat.baidu.com/?pcasync=pc&asyncRenderUrl=&passportStaticPage=https%3A%2F%2Fwww.baidu.com%2Fcache%2Fuser%2Fhtml%2Fv3Jump.html&from=pc_tab&word=${encodeURI(e)}&source=pd_ic`,{fetch:!0,headers:{Accept:"*/*",Origin:"https://www.baidu.com",Referer:"https://www.baidu.com/"},data:JSON.stringify({data:{}})});if(!t.status)return !1;try{let r=/"aisearch_id":"(.*?)"/i.exec(t.data.responseText);if(!(r!=null&&r[1]))throw new TypeError("获取aisearch_id失败");let n=/"pvId":"(.*?)"/i.exec(t.data.responseText);if(!(n!=null&&n[1]))throw new TypeError("获取pvId失败");let a=/"sessionId":"(.*?)"/i.exec(t.data.responseText);if(!(a!=null&&a[1]))throw new TypeError("获取sessionId失败");return ie.aisearch_id=r[1],ie.pvId=n[1],ie.sessionId=a[1],s.success("获取一言参数aisearch_id:"+ie.aisearch_id),s.success("获取一言参数pvId:"+ie.pvId),s.success("获取一言参数sessionId:"+ie.sessionId),!0}catch(r){return s.error(r),!1}},showChatGPTDialog(){if(ie.dialogAlias!=null){ie.dialogAlias.popsElement.getClientRects().length?s.info("请勿重复打开"):ie.dialogAlias.show();return}ie.dialogAlias=Rr.alert({title:{text:"

文心一言

",position:"center",html:!0},content:{text:""},mask:{enable:!0,clickEvent:{toHide:!0}},btn:{close:{enable:!0,callback(o){o.hide();}}},drag:!0,dragLimit:!0,width:"95vw",height:"90vh",style:` + `}se.info("正在获取所有关注吧");let t=await We.getUserAllLikeForum();if(!t)return;if(!t.length){se.error("该账号尚未关注帖子");return}let r=!1,n=se.loading(e(1,t.length,t[0].forum_name,"正在获取tbs"),{showClose:!0,onClose(){r=!0;}});for(let a=0;a ${s}`),n.setHTML(e(a+1,t.length,i.forum_name,"发送签到请求..."));let l=await We.forumSign(i.forum_name,s);if(!l){se.info("2秒后切换至下一个"),await p.sleep(2e3);continue}typeof l.data=="object"?n.setHTML(e(a+1,t.length,i.forum_name,`今日本吧第${l.data.finfo.current_rank_info.sign_count}个签到`)):se.error(l.error),se.info("2秒后切换至下一个"),await p.sleep(2e3);}se.success(`执行签到 ${t.length} 个贴吧完毕`),n.close();})]},{text:"通用",type:"forms",forms:[E("检测骨架屏","baidu_tieba_checkSkeleton",!0,void 0,"当页面加载完毕后检测到还是骨架屏,将会自动刷新页面"),E("自动重定向至主域名","baidu_tieba_autoJumpToMainHost",!1,void 0,"域名为nba.baidu.com、static.tieba.baidu.com...等时自动重定向至tieba.baidu.com")]},{text:"搜索功能",type:"forms",forms:[E("启用","baidu_tieba_add_search",!0,void 0,"在贴内和吧内右上角添加搜索按钮"),E("获取详细信息","baidu_tieba_search_opt_user_info",!0,void 0,"将搜索结果的【用户名/头像】替换成请求获取的【用户名/头像】"),E("使用【搜索综合】","baidu_tieba_use_hybrid_search",!1,void 0,"使用贴吧移动端的搜索功能")]},{text:"首页",type:"forms",forms:[E("新标签页打开","baidu_tieba_index_openANewTab",!1,void 0,"新标签页打开帖子")]},{text:"话题热议",type:"forms",forms:[E("重定向xx吧跳转","baidu_tieba_topic_redirect_jump",!0,void 0,"点击帖子直接跳转"),E("新标签页打开","baidu_tieba_topic_openANewTab",!1,void 0,"新标签页打开帖子")]},{text:"搜索综合",type:"forms",forms:[E("新标签页打开","baidu_tieba_hybrid_search_openANewTab",!1,void 0,"新标签页打开帖子")]},{text:"吧内功能",type:"forms",forms:[E("记住当前选择的看帖排序","baidu_tieba_remember_user_post_sort",!0,void 0,"记住选择的发布/回复"),E("过滤重复帖子","baidu_tieba_filterDuplicatePosts",!1,void 0,"过滤掉重复id的帖"),E("解除签到限制","baidu_tieba_removeForumSignInLimit",!0,void 0,"在登录情况下可点击签到"),E("新标签页打开","baidu_tieba_openANewTab",!1,void 0,"新标签页打开帖子")]},{text:"帖内功能",type:"forms",forms:[E("楼中楼回复弹窗后退手势优化","baidu_tieba_lzl_ban_global_back",!1,function(e,t){t&&alert("开启后,当在手机浏览器中使用屏幕左滑回退网页操作或者点击浏览器的回退到上一页按钮,不会触发回退上一页操作,而是会关闭当前查看的楼中楼的弹窗。注:某些浏览器不适用");},"使浏览器后退变成关闭楼中楼弹窗"),E("新增滚动到顶部按钮","baidu_tieba_add_scroll_top_button_in_forum",!0,void 0,"向下滚动的距离>页面高度*2就会出现按钮"),E("优化查看评论","baidu_tieba_optimize_see_comments",!0,void 0,"可以查看更多的评论"),E("优化图片点击预览","baidu_tieba_optimize_image_preview",!0,void 0,"使用Viewer查看图片"),E("强制查看被屏蔽的帖子","baidu_tieba_repairErrorThread",!1,function(e,t){t&&window.alert("开启后,如果查看的帖子显示【贴子不存在或者已被删除】或【该帖子需要去app内查看哦】,且该帖子在PC端可以查看,那么该修复可以生效。");},"PC端可以查看帖子该功能才能正确生效"),E("点击楼主头像正确跳转主页","baidu_tieba_clickOnTheOwnerSAvatarToCorrectlyRedirectToTheHomepage",!0,void 0,"点击头像正确跳转至用户主页"),E("屏蔽机器人","baidu_tieba_shield_commnets_baodating",!0,void 0,"屏蔽【贴吧包打听】机器人,回答的评论都是牛头不对马嘴的"),E("显示用户当前吧的等级头衔","baidu_tieba_show_forum_level",!0,void 0,"只对评论和楼中楼的用户进行显示处理"),E("实验性-请求携带Cookie","baidu_tieba_request_with_cookie",!1,void 0,"非浏览器插件使用")]},{text:"劫持/拦截",type:"forms",forms:[E("劫持-唤醒App","baidu_tieba_hijack_wake_up",!1,void 0,"阻止唤醒调用App"),E("伪装客户端已调用","baidu_tieba_clientCallMasquerade",!0,void 0,"阻止弹窗")]}]},Ai={id:"baidu-panel-config-wenku",title:"文库",headerTitle:"百度文库
wk.baidu.com
tanbi.baidu.com",isDefault:Y.isWenKu,scrollToDefaultView:!0,forms:[{text:"屏蔽",type:"forms",forms:[E("【屏蔽】会员精选","baidu_wenku_block_member_picks",!0),E("【屏蔽】APP精选","baidu_wenku_blocking_app_featured",!0),E("【屏蔽】相关文档","baidu_wenku_blocking_related_documents",!1),E("【屏蔽】底部工具栏","baidu_wenku_blocking_bottom_toolbar",!1),E("【屏蔽】下一篇按钮","baidu_wenku_shield_next_btn",!1),E("【屏蔽】文档助手","baidu_wenku_blockDocumentAssistant",!1,void 0,"右下角的悬浮按钮")]}]},Ci={id:"baidu-panel-config-jingyan",title:"经验",headerTitle:"百度经验
jingyan.baidu.com",isDefault(){return Y.isJingYan()},scrollToDefaultView:!0,forms:[]},Ei={id:"baidu-panel-config-baike",title:"百科",headerTitle:"百度百科
baike.baidu.com
wapbaike.baidu.com",isDefault(){return Y.isBaiKe()},scrollToDefaultView:!0,forms:[{text:"劫持Box",type:"forms",forms:[E("isBox","baidu-baike-Box-isBox",!0,void 0,"Box.isBox和Box.$isBox强制返回true"),E("isLiteBox","baidu-baike-Box-isLiteBox",!1,void 0,"Box.isLiteBox和Box.$isLiteBox强制返回true"),E("isInfoBox","baidu-baike-Box-isInfoBox",!1,void 0,"Box.isInfoBox和Box.$isInfoBox强制返回true"),E("isIOS","baidu-baike-Box-isIOS",!1,void 0,"Box.isIOS和Box.$isIOS强制返回true"),E("isAndroid","baidu-baike-Box-isAndroid",!1,void 0,"Box.isAndroid和Box.$isAndroid强制返回true"),E("android.invokeApp","baidu-baike-Box-android.invokeApp",!0,void 0,"Box.android.invokeApp()置空"),E("android.invokeLiteApp","baidu-baike-Box-android.invokeLiteApp",!0,void 0,"Box.android.invokeLiteApp()置空"),E("ios.invokeApp","baidu-baike-Box-ios.invokeApp",!0,void 0,"Box.ios.invokeApp()置空")]},{text:"他说(/tashuo)",type:"forms",forms:[E("【屏蔽】底部广告","baidu_baike_tashuo_remove_bottom_ad",!0)]}]},Pi={id:"baidu-panel-config-zhidao",title:"知道",headerTitle:"百度知道
zhidao.baidu.com",isDefault(){return Y.isZhiDao()},scrollToDefaultView:!0,forms:[{text:"屏蔽",type:"forms",forms:[E("【屏蔽】推荐更多精彩内容","baidu_zhidao_block_recommend_more_exciting_content",!0),E("【屏蔽】相关问题","baidu_zhidao_block_related_issues",!0),E("【屏蔽】其他回答","baidu_zhidao_block_other_answers",!1),E("【屏蔽】顶部浮动工具栏","baidu_zhidao_shield_top_fixed_toolbar",!1)]}]},Li={id:"baidu-panel-config-fanyi",title:"翻译",headerTitle:"百度翻译
fanyi.baidu.com
fanyi-app.baidu.com",isDefault(){return Y.isFanYi()||Y.isFanYiApp()},scrollToDefaultView:!0,forms:[{text:"屏蔽",type:"forms",forms:[E("【屏蔽】底部推荐","baidu_fanyi_recommended_shielding_bottom",!0),E("【屏蔽】底部其它","baidu_fanyi_other_shielding_bottom",!0)]},{text:"功能",type:"forms",forms:[E("自动聚焦输入框","baidu_fanyi_auto_focus",!0)]},{text:"App(fanyi-app)",type:"forms",forms:[E("【屏蔽】专栏信息","baidu_fanyi_app_shield_column_information",!1),E("【屏蔽】为你推荐","baidu_fanyi_app_shield_recommended_for_you",!1),E("【屏蔽】我要跟读","baidu_fanyi_app_shield_i_need_to_follow_along",!1)]}]},Bi={id:"baidu-panel-config-image",title:"图片",headerTitle:"百度经验
image.baidu.com",isDefault(){return Y.isJingYan()},scrollToDefaultView:!0,forms:[]},Ni={id:"baidu-panel-config-map",title:"地图",headerTitle:"百度地图
map.baidu.com",isDefault(){return Y.isMap()},scrollToDefaultView:!0,forms:[{text:"劫持/拦截",type:"forms",forms:[E("拦截-唤醒App","baidu_map_hijack_wakeup",!0,void 0,"阻止唤醒调用App")]}]},Mi={id:"baidu-panel-config-xue",title:"知了好学",headerTitle:"知了好学
xue.baidu.com",isDefault(){return Y.isJingYan()},scrollToDefaultView:!0,forms:[]},Ii={id:"baidu-panel-config-aiqicha",title:"爱企查",headerTitle:"爱企查
aiqicha.baidu.com",isDefault(){return Y.isAiQiCha()},scrollToDefaultView:!0,forms:[{text:"屏蔽",type:"forms",forms:[E("【屏蔽】轮播图","baidu_aiqicha_shield_carousel",!0),E("【屏蔽】行业热点新闻","baidu_aiqicha_shield_industry_host_news",!0)]}]},Ri={id:"baidu-panel-config-pos",title:"网盟",headerTitle:"百度网盟推广
pos.baidu.com",isDefault(){return Y.isPos()},scrollToDefaultView:!0,forms:[]},$i={id:"baidu-panel-config-haokan",title:"好看视频",headerTitle:"好看视频
haokan.baidu.com",isDefault(){return Y.isHaoKan()},scrollToDefaultView:!0,forms:[{text:"屏蔽",type:"forms",forms:[E("【屏蔽】猜你喜欢","baidu_haokan_shield_may_also_like",!0),E("【屏蔽】今日热播榜单","baidu_haokan_shield_today_s_hot_list",!0),E("【屏蔽】右侧工具栏","baidu_haokan_shield_right_video_action",!0)]},{text:"功能",type:"forms",forms:[E("播放视频自动进入全屏","baidu_haokan_play_video_and_automatically_enter_full_screen",!1)]},{text:"劫持/拦截",type:"forms",forms:[E("拦截-唤醒App","baidu_haokan_hijack_wakeup",!0,void 0,"阻止唤醒调用App")]}]},Oi={id:"baidu-panel-config-graph",title:"识图",headerTitle:"百度识图
graph.baidu.com",isDefault(){return Y.isGraph()},scrollToDefaultView:!0,forms:[{text:"功能",type:"forms",forms:[E("【重构】识图一下","baidu-graph-repairHomeRecognitionPicture",!0,void 0,"重构主页的识图一下,就可以直接点击上传图片进行搜索"),E("【重构】搜索按钮","baidu-graph-repairSearchButton",!0,void 0,"重构主页的往下滑动右下角出现的搜索图标按钮"),E("【重构】重拍","baidu-graph-repairRetakeButton",!0,void 0,"在已搜索出相关结果的界面中的重构【重拍】按钮"),E("修复搜索无结果","baidu-graph-repairSearchNoResult",!0,void 0,"如果出现识图没结果,重新识别,可能是因为后面参数多了tpl_from=pc的问题")]}]},Di={id:"baidu-panel-config-pan",title:"网盘",headerTitle:"百度网盘
pan.baidu.com",isDefault(){return Y.isPan()},scrollToDefaultView:!0,forms:[]},zi={id:"baidu-panel-config-yiyan",title:"文心一言",headerTitle:"文心一言
yiyan.baidu.com",isDefault(){return Y.isYiYan()},scrollToDefaultView:!0,forms:[{text:"屏蔽",type:"forms",forms:[E("【屏蔽】文字/图片水印","baidu_yiyan_remove_ai_mask",!0)]}]},qi={id:"baidu-panel-config-chat",title:"AI伙伴",headerTitle:"搜索AI伙伴
chat.baidu.com",isDefault(){return Y.isChat()},scrollToDefaultView:!0,forms:[{text:"屏蔽",type:"forms",forms:[E("【屏蔽】文字/图片水印","baidu_chat_remove_ai_mask",!0)]}]},Ui={id:"baidu-panel-config-easy-learn",title:"教育",headerTitle:"百度教育
easylearn.baidu.com
uf9kyh.smartapps.cn",isDefault(){return Y.isEasyLearn()||Y.isMiniJiaoYu()},scrollToDefaultView:!0,forms:[{text:"小程序",type:"forms",forms:[E("【屏蔽】底部下拉菜单","mini_baidu_jiaoyu_shield_bottom_pull_down_menu",!1)]},{text:"屏蔽",type:"forms",forms:[E("【屏蔽】本题试卷","baidu_easylearn_shield_this_question_paper",!1),E("【屏蔽】本卷好题","baidu_easylearn_shield_good_questions_in_this_volume",!1),E("【屏蔽】相关试卷","baidu_easylearn_shield_related_test_papers",!1),E("【屏蔽】视频讲解","baidu_easylearn_shield_video_explanation",!1),E("【屏蔽】学霸笔记","baidu_easylearn_shield_xueba_notes",!1),E("【屏蔽】底部工具栏","baidu_easylearn_shield_bottom_toolbar",!1)]},{text:"功能",type:"forms",forms:[E("解锁顶部搜索框","baidu_easylearn_unlocking_top_search_input",!0),E("解锁搜题上限","baidu_easylearn_unlocking_the_upper_limit_of_search_questions",!0),E("自动显示答案","baidu_easylearn_auto_show_answer",!0)]}]},Hi={id:"baidu-panel-config-ai-study",title:"知了爱学",headerTitle:"知了爱学
aistudy.baidu.com
isite.baidu.com/site/wjz2tdly",isDefault(){return Y.isAiStudy()||Y.isISite()},scrollToDefaultView:!0,forms:[{text:"知了爱学(isite)👇",type:"forms",forms:[]},{text:"屏蔽",type:"forms",forms:[E("【屏蔽】底部免费在线咨询","baidu_isite_wjz2tdly_shieldBottomBarRootContainer",!0),E("【屏蔽】右侧悬浮按钮-查看更多","baidu_isite_wjz2tdly_shieldRightSeeMoreToolBar",!1),E("【屏蔽】大家还在看","baidu_isite_wjz2tdly_shieldArticleBottom",!0)]},{text:"功能",type:"forms",forms:[E("自动展开全文","baidu_isite_wjz2tdly_autoExpandFullText",!0)]},{text:"知了爱学(aistudy)👇",type:"forms",forms:[]},{text:"屏蔽",type:"forms",forms:[E("【屏蔽】底部工具栏","baidu_ai_study_shieldBottomToolBar",!0)]},{text:"功能",type:"forms",forms:[E("自动展开全文","baidu_ai_study_autoExpandFullText",!0)]}]},ie={dialogAlias:null,isIniting:!1,isInitParams:!1,aisearch_id:null,pvId:null,sessionId:null,question:[],async init(){this.isInitParams?this.isIniting||this.showChatGPTDialog():(this.isIniting=!0,se.info("初始化参数中..."),this.isInitParams=!!await this.initParams(),this.isIniting=!1,this.isInitParams?(se.success("初始化成功!"),this.init()):se.error("初始化参数失败"));},async initParams(e=""){let t=await ge.get(`https://chat.baidu.com/?pcasync=pc&asyncRenderUrl=&passportStaticPage=https%3A%2F%2Fwww.baidu.com%2Fcache%2Fuser%2Fhtml%2Fv3Jump.html&from=pc_tab&word=${encodeURI(e)}&source=pd_ic`,{fetch:!0,headers:{Accept:"*/*",Origin:"https://www.baidu.com",Referer:"https://www.baidu.com/"},data:JSON.stringify({data:{}})});if(!t.status)return !1;try{let r=/"aisearch_id":"(.*?)"/i.exec(t.data.responseText);if(!(r!=null&&r[1]))throw new TypeError("获取aisearch_id失败");let n=/"pvId":"(.*?)"/i.exec(t.data.responseText);if(!(n!=null&&n[1]))throw new TypeError("获取pvId失败");let a=/"sessionId":"(.*?)"/i.exec(t.data.responseText);if(!(a!=null&&a[1]))throw new TypeError("获取sessionId失败");return ie.aisearch_id=r[1],ie.pvId=n[1],ie.sessionId=a[1],o.success("获取一言参数aisearch_id:"+ie.aisearch_id),o.success("获取一言参数pvId:"+ie.pvId),o.success("获取一言参数sessionId:"+ie.sessionId),!0}catch(r){return o.error(r),!1}},showChatGPTDialog(){if(ie.dialogAlias!=null){ie.dialogAlias.popsElement.getClientRects().length?o.info("请勿重复打开"):ie.dialogAlias.show();return}ie.dialogAlias=Rr.alert({title:{text:"

文心一言

",position:"center",html:!0},content:{text:""},mask:{enable:!0,clickEvent:{toHide:!0}},btn:{close:{enable:!0,callback(s){s.hide();}}},drag:!0,dragLimit:!0,width:"95vw",height:"90vh",style:` .pops{ --container-title-height: 45px; --container-bottom-btn-height: 100px; @@ -369,14 +369,14 @@ match-attr##srcid##sp_purc_atom 发送 - `;let t=e.querySelector("textarea"),r=e.querySelector(".pops-alert-btn-ok"),n=e.querySelector(".pops-alert-btn-clear-history"),a=ie.dialogAlias.popsElement.querySelector(".pops-alert-content");a.innerHTML="";function i(o){let l=t.value;if(l.trim()===""){se.error("你没有输入内容哦",{timeout:1500});return}t.value="";let c=ie.getAskElement(l),u=ie.getAnswerElement(),f=u.querySelector(".answer-text"),m=v.createElement("div",{className:"ask-container"}),b="";ie.question.forEach(w=>{w.questionText&&(b+=` + `;let t=e.querySelector("textarea"),r=e.querySelector(".pops-alert-btn-ok"),n=e.querySelector(".pops-alert-btn-clear-history"),a=ie.dialogAlias.popsElement.querySelector(".pops-alert-content");a.innerHTML="";function i(s){let l=t.value;if(l.trim()===""){se.error("你没有输入内容哦",{timeout:1500});return}t.value="";let c=ie.getAskElement(l),u=ie.getAnswerElement(),f=u.querySelector(".answer-text"),m=v.createElement("div",{className:"ask-container"}),b="";ie.question.forEach(w=>{w.questionText&&(b+=` `+w.questionText,w.answerText&&(b+=` `+w.answerText));}),b+=` -`+l,ie.question.push({questionText:l,answerText:void 0,markdownText:void 0}),ie.conversation(b).then(async w=>{if(!w){ie.question.pop();return}try{let x=ie.question[ie.question.length-1],g=await ie.getAnswerStream(w,_=>{x.answerText+=_,f.innerText+=_,ie.scrollToContentContainerEnd();});if(f.classList.remove("typing"),!g){ie.question.pop();return}x.answerText=g;let S=ie.conversionTextToMarkdown(g);s.info(["转换为markdown",S]),S.status?(x.markdownText=S.text,f.innerHTML=S.text,ie.handleMarkdown(f)):se.error("转换为Markdown失败"),ie.scrollToContentContainerEnd();}catch(x){f.classList.remove("typing"),ie.question.pop(),s.error(x),se.error(x);}}),m.appendChild(c),m.appendChild(u),a.appendChild(m),ie.scrollToContentContainerEnd();}p.listenKeyboard(t,"keydown",function(o,l,c){c.includes("ctrl")&&o==="Enter"&&r.click();}),v.on(r,"click",void 0,i),v.on(n,"click",void 0,function(){ie.clearHistoryQuestion();});},async getAnswerStream(e,t){const r=e.getReader();async function n(){let a=[],i="",o=[],l;return new Promise((c,u)=>{r.read().then(function f({done:m,value:b}){var w,x,g,S,_,B,k,O;try{if(m){s.success("=====读取结束,转换内容=====");let I=a.join("");c(I);return}let q=new TextDecoder("utf-8").decode(b);q=q.trim(),!q.includes("event:ping")&&!q.startsWith("event:messag")?(o.push(i),o.push(q),i="",q=o.join(""),o=[]):q.includes("event:ping")||(i=q);let z=q.split(` -`).filter(I=>I.trim().startsWith("data:"));for(let I of z){I=I.trim();let U=I.replace(/^data:/gi,"").trim();if(p.isNull(U))continue;s.info(U);let R=p.toJSON(U);if(p.isNull(R))continue;let G=(S=(g=(x=(w=R==null?void 0:R.data)==null?void 0:w.message)==null?void 0:x.content)==null?void 0:g.generator)==null?void 0:S.text;G&&(t(G),a.push(G),(O=(k=(B=(_=R==null?void 0:R.data)==null?void 0:_.message)==null?void 0:B.content)==null?void 0:k.generator)!=null&&O.referenceList&&(l=R==null?void 0:R.data.message.content.generator.referenceList));}}catch(q){s.error(q);}return r.read().then(f)}).catch(f=>{u(f);});})}return n()},loadCSS(e){ie.dialogAlias.$shadowRoot.insertBefore(v.createElement("link",{rel:"stylesheet",href:e,type:"text/css",crossOrigin:"anonymous"}),ie.dialogAlias.$shadowRoot.childNodes[0]);},getAskElement(e=""){return v.createElement("div",{className:"user-question",innerHTML:` +`+l,ie.question.push({questionText:l,answerText:void 0,markdownText:void 0}),ie.conversation(b).then(async w=>{if(!w){ie.question.pop();return}try{let S=ie.question[ie.question.length-1],g=await ie.getAnswerStream(w,y=>{S.answerText+=y,f.innerText+=y,ie.scrollToContentContainerEnd();});if(f.classList.remove("typing"),!g){ie.question.pop();return}S.answerText=g;let x=ie.conversionTextToMarkdown(g);o.info(["转换为markdown",x]),x.status?(S.markdownText=x.text,f.innerHTML=x.text,ie.handleMarkdown(f)):se.error("转换为Markdown失败"),ie.scrollToContentContainerEnd();}catch(S){f.classList.remove("typing"),ie.question.pop(),o.error(S),se.error(S);}}),m.appendChild(c),m.appendChild(u),a.appendChild(m),ie.scrollToContentContainerEnd();}p.listenKeyboard(t,"keydown",function(s,l,c){c.includes("ctrl")&&s==="Enter"&&r.click();}),v.on(r,"click",void 0,i),v.on(n,"click",void 0,function(){ie.clearHistoryQuestion();});},async getAnswerStream(e,t){const r=e.getReader();async function n(){let a=[],i="",s=[],l;return new Promise((c,u)=>{r.read().then(function f({done:m,value:b}){var w,S,g,x,y,P,k,O;try{if(m){o.success("=====读取结束,转换内容=====");let R=a.join("");c(R);return}let q=new TextDecoder("utf-8").decode(b);q=q.trim(),!q.includes("event:ping")&&!q.startsWith("event:messag")?(s.push(i),s.push(q),i="",q=s.join(""),s=[]):q.includes("event:ping")||(i=q);let D=q.split(` +`).filter(R=>R.trim().startsWith("data:"));for(let R of D){R=R.trim();let U=R.replace(/^data:/gi,"").trim();if(p.isNull(U))continue;o.info(U);let $=p.toJSON(U);if(p.isNull($))continue;let G=(x=(g=(S=(w=$==null?void 0:$.data)==null?void 0:w.message)==null?void 0:S.content)==null?void 0:g.generator)==null?void 0:x.text;G&&(t(G),a.push(G),(O=(k=(P=(y=$==null?void 0:$.data)==null?void 0:y.message)==null?void 0:P.content)==null?void 0:k.generator)!=null&&O.referenceList&&(l=$==null?void 0:$.data.message.content.generator.referenceList));}}catch(q){o.error(q);}return r.read().then(f)}).catch(f=>{u(f);});})}return n()},loadCSS(e){ie.dialogAlias.$shadowRoot.insertBefore(v.createElement("link",{rel:"stylesheet",href:e,type:"text/css",crossOrigin:"anonymous"}),ie.dialogAlias.$shadowRoot.childNodes[0]);},getAskElement(e=""){return v.createElement("div",{className:"user-question",innerHTML:`
@@ -394,7 +394,7 @@ match-attr##srcid##sp_purc_atom 复制代码 - `}),o=i.querySelector(".code-copy-text");v.on(o,"click",void 0,function(){try{p.setClip(a),se.success("复制成功");}catch(l){se.error("复制失败,"+l);}}),v.before(t,i);});},clearHistoryQuestion(){ie.question=[];let e=ie.dialogAlias.$shadowRoot.querySelector(".pops-alert-content");e.innerHTML="";},scrollToContentContainerEnd(){let e=ie.dialogAlias.popsElement.querySelector(".pops-alert-content");e.scrollTo(0,e.scrollHeight);}},y={$data:{data:new p.Dictionary,oneSuccessExecMenu:new p.Dictionary,onceExec:new p.Dictionary,scriptName:tn,key:ct,attributeKeyName:Sr,attributeDefaultValueName:kr},$listener:{listenData:new p.Dictionary},init(){this.initPanelDefaultValue(),this.initExtensionsMenu();},initExtensionsMenu(){ae.top===ae.self&&xr.add([{key:"show_pops_panel_setting",text:"⚙ 设置",autoReload:!1,isStoreValue:!1,showText(e){return e},callback:()=>{this.showPanel();}},{key:"show_yiyan_chatgpt",text:"⚙ 文心一言",autoReload:!1,isStoreValue:!1,showText(e){return e},callback:()=>{ie.init();}}]);},initPanelDefaultValue(){let e=this;function t(n){if(!n.attributes)return;let a=n.attributes[Sr],i=n.attributes[kr];if(a==null){s.warn(["请先配置键",n]);return}e.$data.data.has(a)&&s.warn("请检查该key(已存在): "+a),e.$data.data.set(a,i);}let r=this.getPanelContentConfig();for(let n=0;n450?"80dvh":"450px"},getPanelContentConfig(){return [xi,Si,Ti,Ai,Ci,Ei,Bi,Li,Pi,Mi,Ni,Ii,Ri,$i,Oi,zi,Di,qi,Ui,Hi]}},ji=`.c-container.na-ec-item,\r + `}),s=i.querySelector(".code-copy-text");v.on(s,"click",void 0,function(){try{p.setClip(a),se.success("复制成功");}catch(l){se.error("复制失败,"+l);}}),v.before(t,i);});},clearHistoryQuestion(){ie.question=[];let e=ie.dialogAlias.$shadowRoot.querySelector(".pops-alert-content");e.innerHTML="";},scrollToContentContainerEnd(){let e=ie.dialogAlias.popsElement.querySelector(".pops-alert-content");e.scrollTo(0,e.scrollHeight);}},_={$data:{data:new p.Dictionary,oneSuccessExecMenu:new p.Dictionary,onceExec:new p.Dictionary,scriptName:tn,key:ut,attributeKeyName:Sr,attributeDefaultValueName:kr},$listener:{listenData:new p.Dictionary},init(){this.initPanelDefaultValue(),this.initExtensionsMenu();},initExtensionsMenu(){Z.top===Z.self&&xr.add([{key:"show_pops_panel_setting",text:"⚙ 设置",autoReload:!1,isStoreValue:!1,showText(e){return e},callback:()=>{this.showPanel();}},{key:"show_yiyan_chatgpt",text:"⚙ 文心一言",autoReload:!1,isStoreValue:!1,showText(e){return e},callback:()=>{ie.init();}}]);},initPanelDefaultValue(){let e=this;function t(n){if(!n.attributes)return;let a=n.attributes[Sr],i=n.attributes[kr];if(a==null){o.warn(["请先配置键",n]);return}e.$data.data.has(a)&&o.warn("请检查该key(已存在): "+a),e.$data.data.set(a,i);}let r=this.getPanelContentConfig();for(let n=0;n450?"80dvh":"450px"},getPanelContentConfig(){return [xi,Si,Ti,Ai,Ci,Ei,Pi,Li,Bi,Ni,Mi,Ii,Ri,$i,Oi,Di,zi,qi,Ui,Hi]}},ji=`.c-container.na-ec-item,\r .c-container.ec-container,\r div[data-type="ad"],\r .c-result.sfc-log[data-tpl="adv_wenku_fc"],\r @@ -577,18 +577,18 @@ div[class^="new-summary-container_"] {\r div[class^="index_brandEntry"] {\r display: none !important;\r }\r -`,Vi={init(){y.execMenu("baidu_search_headlth_shield_other_info",()=>{this.shieldOtherInfo();}),y.execMenu("baidu_search_headlth_shield_bottom_toolbar",()=>{this.shieldServiceButtonsRow();});},shieldOtherInfo(){s.success("【屏蔽】底部其它信息"),$(` +`,Vi={init(){_.execMenu("baidu_search_headlth_shield_other_info",()=>{this.shieldOtherInfo();}),_.execMenu("baidu_search_headlth_shield_bottom_toolbar",()=>{this.shieldServiceButtonsRow();});},shieldOtherInfo(){o.success("【屏蔽】底部其它信息"),I(` article[class] > div[class^="index_container"]{ display: none !important; } - `);},shieldServiceButtonsRow(){s.success("【屏蔽】底部工具栏"),$(` + `);},shieldServiceButtonsRow(){o.success("【屏蔽】底部工具栏"),I(` article[class] > div[class^="index_healthServiceButtonsRow"]{ display: none !important; } - `);}},Te={hijackFunctionApply(e){e=e.toLowerCase(),ae.Function.prototype.apply=function(...t){if(e.includes("copy"))try{let r=t[1];if(t.length===2&&typeof r=="object"&&""+r=="[object Arguments]"&&r.length===1&&typeof r[0]=="object"&&r[0]!=null&&"appName"in r[0]&&"checkTokenCopied"in r[0]&&"deeplink"in r[0]&&"scheme"in r[0]&&"token"in r[0]&&"useDeeplink"in r[0])return s.success(["劫持复制到剪贴板函数",...r]),new Promise(function(n){s.success(["修改参数并劫持复制到剪贴板返回true"]),n({status:!0});})}catch{}else if(e.includes("scheme"))try{let r=t[1];if(t.length===2&&typeof r=="object"&&""+r=="[object Arguments]"&&r.length===2&&r[1]==="scheme"){s.success(["劫持Scheme",...r]);return}}catch{}return Ue.Function.apply.call(this,...t)};},hijack_onClick(e){ae.Object.defineProperty=function(t,r,n){if(r==="_onClick"){s.info(["成功劫持_onClick",arguments]);let a=n.value;n.value=function(i){let o=this._getNode(i.target),l=this._getType(o);if(l==="link"){let c=this._getLinkProps(o);if(s.success(["点击事件-linkProps信息",c]),!c.href){v.trigger(document,"click",i,!1);return}p.preventEvent(i),y.getValue("baidu_search_hijack__onClick_to_blank")?(s.success("新标签页打开: "+c.href),window.open(c.href,"_blank")):window.location.href=c.href;}else s.success(["点击事件-this._getType(eventNode)不为link",l,i]),a.call(this,...arguments);};}return Ue.Object.defineProperty.call(this,...arguments)};},hijackElementAppendChild(e){ae.Element.prototype.appendChild=function(t){var r;if(t instanceof HTMLIFrameElement&&!((r=t==null?void 0:t.src)!=null&&r.startsWith("http"))){s.success(["劫持iframe唤醒:"+t.src,t]);return}if(!(typeof e=="function"&&e(t)))return Ue.Element.appendChild.call(this,t)};},hijackJQueryAppend(){let e=ae.$.fn.append;ae.$.fn.append=function(t){if(typeof t=="string"&&(t=t.trim(),t.startsWith('