Revision #6 has been created by softark on Aug 26, 2013, 12:32:48 PM with the memo:
supported asynchronous loading of javascript
« previous (#5) next (#7) »
Changes
Title
unchanged
Simple Share Widget for Facebook, twitter and google+
Category
unchanged
How-tos
Yii version
unchanged
Tags
unchanged
facebook, like, comments, twitter, tweet, google plusone
Content
changed
[...]
var js,fjs=d.getElementsByTagName(s)[0],
p=/^http:/.test(d.location)?'http':'https';
if(!d.getElementById(id)){
js=d.createElement(s);
js.id=id;
js.async=true;
js.src=p+'://platform.twitter.com/widgets.js';
fjs.parentNode.insertBefore(js,fjs);
}[...]
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.async=true;
js.src = "//connect.facebook.net/ja_JP/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
}
INIT_JS;
$cs->registerScript('init-sns-share', $init_js, CClientScript::POS_READY);[...]