[English]
It confused me a lot. Now I found the reason, in short, there is some conflict between Google Friend Connect (GFC) and prototype.js (some plugins of WP used this JS lib).
Workaround - add the code below just before the generated gadget code.
<script>
window.JSON = {
parse: function(st){
return st.evalJSON();
},
stringify: function(obj){
return Object.toJSON(obj);
}
};
</script>
For more detail, see this.
[Chinese]
发现Google Friend Connect (GFC) 小工具在Wordpress显示空白的解决办法,希望对别人有用。
GFC的JS代码和prototype.js相冲突(很多WP插件使用这个JS库),解决办法:在生成的gadget代码前加入以下代码即可。
<script>
window.JSON = {
parse: function(st){
return st.evalJSON();
},
stringify: function(obj){
return Object.toJSON(obj);
}
};
</script>
详情:看这里。
What is the answer to life, the universe, and everything?
今天花了一下午用VC+openGL写图形学那个扫描线算法,本来想着用STL现成的list的就行了,没想到list.sort()那个函数竟然不能接我写的函数对象,总是说不能把这个对象转换为greater