且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Firefox扩展内容脚本拒绝加载

更新时间:2023-12-05 09:04:34

下面这行不属于 main.js

var replacediv = jQuery("div#box").eq(0).find('td').eq(3);

这会导致语法错误,因为您已经将它放在对象文本中间 - if你打开错误控制台(Ctrl-Shift-J),你应该看到这个语法错误。如果你删除该行(或者将其移动到内容脚本的开头?),那么你的代码应该可以正常工作。

This should cause a syntax error because you've put it in the middle of an object literal - if you open Error Console (Ctrl-Shift-J) you should see that syntax error. If you remove that line (or move it to the beginning of the content script?) your code should work fine from the look of it.