AC-baidu-google_sogou_bing_RedirectRemove_favicon_adaway_TwoLine

1.bypass the redirect link at baidu\sogou\google\haosou; 2.remove ads at baidu; 3.add Favicon for each website; 4.render your own style; 5.counter; 6.Switch to handle all 7.Auto Pager

< Feedback on AC-baidu-google_sogou_bing_RedirectRemove_favicon_adaway_TwoLine

Question/comment

§
Posted: 2023-08-14

谷歌最近失灵应该是谷歌改了搜索结果的DOM结构 导致原来的选择器找不到url的节点 没法和屏蔽列表做比对

我本地暂时改了一下可以正常工作 但不知道这样改有没有其他问题

找到getNodeHost函数 这样改

function getNodeHost(sitetpNode) {         
          if (curSite.SiteTypeID === SiteType.BAIDU) {
            const href = sitetpNode.getAttribute("href");
            if (href != null && !href.includes("baidu.com/link")) {
              // 已经解析出来了
              return { curHost: getTextHost(href), curUrl: href };
            } else {
              const host = getTextHost(sitetpNode.innerText || sitetpNode.textContent)
              return { curHost: host, curUrl: host, isBaiduLink: true }; // 未被解密
            }
          } else if (sitetpNode.parentNode instanceof HTMLAnchorElement) {
            return { curHost: sitetpNode.parentNode.host, curUrl: sitetpNode.parentNode.href };
          } else {
            const host = getTextHost(sitetpNode.innerText || sitetpNode.textContent)
            return { curHost: host, curUrl: host };
          }
        }

个人的临时修改方案,仅供参考

Post reply

Sign in to post a reply.