Popup of Flash in Different Browsers
我们知道点击flash,flash打开新窗口,有时候会被浏览器阻止。下面的测试会说明在那些情况下会被阻止。
在配置文件config.yml中添加以下配置:
# duoshuo Comments duoshuo_short_name: your_duoshuo_shortname
添加文件templates/post/duoshuo_thread.ftl
<!-- Duoshuo Comment BEGIN -->
<div class="ds-thread"></div>
<script type="text/javascript">
var duoshuoQuery = {short_name:"dollar{ site.duoshuo_short_name }"};
// dollar 请手动转换为$,为了避免被OpooPress解析成博主自己的shortname使用dollar替代了$
(function() {
var ds = document.createElement('script');
ds.type = 'text/javascript';ds.async = true;
ds.src = 'http://static.duoshuo.com/embed.js';
ds.charset = 'UTF-8';
(document.getElementsByTagName('head')[0]
|| document.getElementsByTagName('body')[0]).appendChild(ds);
})();
</script>
<!-- Duoshuo Comment END -->
添加文件templates/post/comments_duoshuo.ftl
<#-- page.comments is not set or true --> <#if site.duoshuo_short_name?? && (page.comments)!true == true><#assign showComments = true> <section> <h1><@i18n.msg "Comments"/></h1> <#include "duoshuo_thread.ftl"> </section> </#if>
将 templates/_post.ftl第28行修改为
<#include "post/comments_duoshuo.ftl">