Ste*_*ett 9 javascript django google-chrome cross-domain
我的网页因此结束:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">var switchTo5x=false;</script>
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">
stLight.options({publisher: "ur-24e62f76-1f66-e3aa-1190-c533b729ca11", doNotHash: true, doNotCopy: true, hashAddressBar: false});
</script>
<script type="text/javascript" src="/static/bootstrap/js/bootstrap.js"></script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
在FireFox和Safari中,它表现得很好.在Chrome中:
Uncaught ReferenceError: stLight is not defined nectar-tugg-art:229
(anonymous function)
Run Code Online (Sandbox Code Playgroud)
换句话说,w.sharethis.com/button/buttons.js上的代码无法执行,因此无法定义stLight变量.
该页面是在远程服务器上运行的Django Web应用程序的一部分.在本地保存生成的HTML页面,然后在Chrome中查看,可以正常工作.
此时我被困住了.与跨域安全模型有什么关系?没有任何安全例外.
与其他javascript文件有些奇怪的交互?
静态(生成)代码在这里.它不会从Dropbox运行.
Ste*_*ett 22
好吧,我想我可能已经找到了它:该网站在Chrome的隐身(色情)模式下运行正常.所以我强烈怀疑我有一些干扰它的扩展(比如Do Not Track或其他东西).
编辑它是Collusion的"阻止已知跟踪网站"功能.
小智 5
就我而言,我替换了
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
Run Code Online (Sandbox Code Playgroud)
这由
<script type="text/javascript" src="https://ws.sharethis.com/button/buttons.js"></script>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
18046 次 |
最近记录: |