tongwentang / New-Tongwentang-for-Firefox

http://tongwen.openfoundry.org/
96 stars 15 forks source link

fix https://github.com/softcup/New-Tongwentang-for-Firefox/issues/21 #32

Closed heroboy closed 6 years ago

heroboy commented 6 years ago

修复了 https://github.com/softcup/New-Tongwentang-for-Firefox/issues/21 但是实际转换还是转换了整个页面而不是仅仅是当前的frame

heroboy commented 6 years ago

是不是已经在develop branch修复好了?

heroboy commented 6 years ago

修复了一下 https://github.com/softcup/New-Tongwentang-for-Firefox/issues/29

heroboy commented 6 years ago

我加了个功能,延迟加载几个比较大的js文件。毕竟那几个文件还是比较大了,如果没有使用的话,就不要浪费用户的cpu了。

heroboy commented 6 years ago

另外,你在manifest中指定了browser_action,但是background.js中使用了pageAction,是搞错了吗?

softcup commented 6 years ago

另外,你在manifest中指定了browser_action,但是background.js中使用了pageAction,是搞错了吗?

這部分是我之前有想要測試 pageAction 遺留下來的 dead code,移除就好

ettoolong commented 6 years ago

https://github.com/heroboy/New-Tongwentang-for-Firefox/blob/efc5ba2137cad57dbf3ba18cee15c5d20bf601cf/src/background.js#L145-L151 應該加入 allFrames 這個參數(設成true), 不然 iframe 會無法 inject script.

heroboy commented 6 years ago

@ettoolong 这个pr已经关闭了,你重新创建一个pr吧。