扩展程序在 IE 中不起作用
我很难让我安装的扩展在 IE 8 中工作。当我通过书签运行它时,一切都会正确加载,并且扩展按预期工作。安装扩展程序时,它不会在应有的页面上自动运行。
目前它仅适用于 www.bestbuy.com。点击也不起作用,但您应该能够判断扩展程序是否加载在这些页面上。
以下是书签代码:
javascript:(function(){var d=document;var s=d.createElement('script');s.text="KOBJ_config={'a1229x4:kynetx_app_version':'dev','rids':['a1229x4']};";d.body.appendChild(s);var l=d.createElement('script');l.src='http://init.kobj.net/js/shared/kobj-static.js';d.body.appendChild(l);})()
以下是安装程序的链接:
IE - http://app-files.s3.amazonaws.com/installers /shopscotch-qa_Setup.exe
Firefox - 更改为 .xpi 而不是 .exe
Chrome - 更改为 .crx 而不是 .exe
以下是 KRL 代码: http://app-files.s3.amazonaws.com/installers/shopscotchKRL.js
I'm having a hard time getting my installed extension to work in IE 8. When i run it through a bookmarklet everything loads correctly and the extension works as intended. When installing the extension it won't run automatically on the pages it should.
Currently it'll only work on www.bestbuy.com. Also the click-through won't work, but you should be able to tell if the extension loads on those pages.
Here is the bookmarklet code:
javascript:(function(){var d=document;var s=d.createElement('script');s.text="KOBJ_config={'a1229x4:kynetx_app_version':'dev','rids':['a1229x4']};";d.body.appendChild(s);var l=d.createElement('script');l.src='http://init.kobj.net/js/shared/kobj-static.js';d.body.appendChild(l);})()
Here are links for the installers:
IE - http://app-files.s3.amazonaws.com/installers/shopscotch-qa_Setup.exe
Firefox - change to .xpi instead of .exe
Chrome - change to .crx instead of .exe
Here is the KRL code:
http://app-files.s3.amazonaws.com/installers/shopscotchKRL.js
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
感谢您分享您的源代码。看起来你在发出的 JavaScript 中的各个地方都缺少分号,我猜 IE 会呕吐。我会解决这个问题,然后再试一次。位于第 107 行和第 111 行。
更新 02/18/2011
尝试更改您的调度域,以便不包含域的 www 部分。在测试中我发现 IE 扩展不喜欢它。我已提交错误报告,希望能解决您的问题。 (无论如何,你实际上并不需要 www)
之前的调度块
将变成
在我将调度块更改为没有 www 之后,我能够让它在 bestbuy.com 上运行
Thank you for sharing your source code. Looks like you are missing semicolons in various places in your emitted JavaScript that I'm guessing IE pukes on. I would fix that and then try again. Found on lines 107 and 111.
update 02/18/2011
Try changing your dispatch domains so that you are not including the www part of the domain. In testing I found that the IE extension doesn't like it. I have filed a bug report and hope that fixes your problem. (you don't really need the www anyway)
Previous dispatch block of
would become
After I changed the dispatch block to not have the www I was able to get it to run on bestbuy.com
我有类似的行为...但我清除了缓存并且它开始工作。不确定发生了什么,但它对我来说很清楚。
I had similar behavior... but I cleared my cache and it started working. Not sure WTF happened, but it cleared up for me.