forked from Botanical/BotanJS
41 lines
974 B
JavaScript
41 lines
974 B
JavaScript
(function(){
|
|
var ns = __namespace( "Astro.Blog.Components.SocialButtons" );
|
|
/** @type {Dandelion} */
|
|
var Dand = __import( "Dandelion" );
|
|
/** @type {System.utils.IKey} */
|
|
var IKey = __import( "System.utils.IKey" );
|
|
/** @type {Astro.Bootstrap} */
|
|
var Bootstrap = __import( "Astro.Bootstrap" );
|
|
|
|
var init = function( id )
|
|
{
|
|
var s = Dand.tag( "script" )[0];
|
|
|
|
// Facebook
|
|
var fb = Dand.wrapna(
|
|
"script"
|
|
, IKey.quickDef(
|
|
"type" , 'text/javascript'
|
|
, "id" , 'facebook-jssdk'
|
|
, "src" , "//connect.facebook.net/en_US/all.js#xfbml=1"
|
|
)
|
|
);
|
|
|
|
// Google+
|
|
var gplus = Dand.wrapna(
|
|
"script"
|
|
, IKey.quickDef(
|
|
"type" , 'text/javascript'
|
|
, "async" , true
|
|
, "src" , "https://apis.google.com/js/plusone.js"
|
|
)
|
|
);
|
|
|
|
s.parentNode.insertBefore( fb, s );
|
|
s.parentNode.insertBefore( gplus, s );
|
|
};
|
|
|
|
Bootstrap.regInit( init );
|
|
|
|
})();
|