forked from Botanical/BotanJS
Astro Classes
This commit is contained in:
40
botanjs/src/Astro/Blog/Components/SocialButtons.js
Normal file
40
botanjs/src/Astro/Blog/Components/SocialButtons.js
Normal file
@@ -0,0 +1,40 @@
|
||||
(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 );
|
||||
|
||||
})();
|
Reference in New Issue
Block a user