mebeh's lab

修复 Chrome 扩展 Personal Blocklist

2015-08-15 12:12:21

Update: Google 已与 2015/08/20 更新 Personal Blocklist,已经可用

某次更新之后,Chrome 扩展 Personal Blocklist 突然失效,等了几天仍然没有修复。 搜索了一下找到这个站,给了一个 reddit 的链接,这个帖子说了失效的原因,给了修复方案,翻译一下。

原文

by ekcode:

I fixed the extension if you're interested. It seems Google changed their search results and one of the extension's scripts (content_script.js) ended up failing to find the necessary classes to perform its modifications.

Anyway, here's the updated script: http://pastebin.com/QNp2n63G

Find the folder where the extension is installed and replace the contents of the content_script.js file with the code from pastebin. You can see what was changed here if you want: https://www.diffchecker.com/

翻译

by ekcode:

我修复了这个扩展!貌似是 Google 改了搜索结果的 DOM 结构,扩展中的一个 js 文件(content_script.js)找不到用来显示屏蔽功能的 CSS 类。

总之,这里是修好的 content_script.js:http://pastebin.com/QNp2n63G

找到扩展的安装目录,用刚提供的 pastebin 文件替换 content_script.js 文件;如果你有兴趣的话,这里有个工具 https://www.diffchecker.com/ 可以看看修改的部分。

修改的部分是第282462523538584行,把 'li.' 改成 'div.',重启 Chrome 即可用。



comments powered by Disqus