【问题标题】:Liquid Slider not working properly in chrome extensionLiquid Slider 在 chrome 扩展中无法正常工作
【发布时间】:2015-12-23 01:36:25
【问题描述】:

我正在开发一个 google chrome 扩展程序。我正在使用 Liquid 滑块来帮助我处理弹出窗口,当我在括号中并进行实时预览时,我得到了我想要的结果。

https://gyazo.com/d2b5e7215ff8dfab59d677fd94637a25

但是当我进入谷歌浏览器测试我的扩展时,就会发生这种情况。

https://gyazo.com/48ea596645f0b16305915fb144d2aad8

它不再是选项卡格式。

如果有人知道为什么这不起作用,我找不到任何支持。仅仅是因为我不能在我的 chrome 扩展中使用 Liquid Slider 吗?我不知道。如果您需要更多信息,请告诉我。

编辑:如果无法修复错误并恢复选项卡,我们也可以只使用箭头,并弄清楚如何删除选项卡。

【问题讨论】:

    标签: javascript jquery google-chrome google-chrome-extension adobe-brackets


    【解决方案1】:

    Chrome 扩展程序具有比常规网页更严格的安全性和沙盒功能 - 例如,Content Security Policy is enabled by default。这或许可以解释差异。

    要了解有关问题的更多细节,您可以debug your extension 右键单击​​图标并选择检查弹出窗口。这将打开熟悉的 Chrome 开发工具,您可以在其中检查控制台是否存在错误等。这是否为您提供了更多细节?

    【讨论】:

    • Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' blob: filesystem: chrome-extension-resource:". Either the 'unsafe-inline' keyword, a hash ('sha256-PF9+H7KP4yzeBTGrVg8LyEMg69PnKu2aMdZ6p+GHEP8='), or a nonce ('nonce-...') is required to enable inline execution. 这就是我得到的。现在,我是 chrome 扩展的新手,这是我的第一个项目。我不知道这意味着什么。
    • 我想通了,问题是我的 popup.html 中有 我所要做的就是将脚本代码移动到我的 popup.js 感谢您的帮助我出去!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-11-27
    • 2021-10-22
    • 1970-01-01
    • 2011-07-28
    • 2017-05-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多