diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 69b8e33..14debd9 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -13,4 +13,6 @@ //= require page //= require settings -//= require beathaven \ No newline at end of file +//= require beathaven + +//= require_tree ./social diff --git a/app/assets/javascripts/social/facebook.js b/app/assets/javascripts/social/facebook.js new file mode 100644 index 0000000..e6a8ccd --- /dev/null +++ b/app/assets/javascripts/social/facebook.js @@ -0,0 +1,7 @@ +(function(d, s, id) { + var js, fjs = d.getElementsByTagName(s)[0]; + if (d.getElementById(id)) {return;} + js = d.createElement(s); js.id = id; + js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; + fjs.parentNode.insertBefore(js, fjs); +}(document, 'script', 'facebook-jssdk')); \ No newline at end of file diff --git a/app/assets/javascripts/vkontakte.coffee b/app/assets/javascripts/vkontakte.coffee index a258357..6c8b1f8 100644 --- a/app/assets/javascripts/vkontakte.coffee +++ b/app/assets/javascripts/vkontakte.coffee @@ -1,6 +1,7 @@ class window.Vkontakte api_id: null + session_length: 3600 # seconds constructor: (@api_id) -> @@ -12,6 +13,7 @@ class window.Vkontakte window.vkAsyncInit = -> VK.init apiId: _vkontakte.getApiId() _vkontakte.auth() + setTimeout -> $('#vk_api_transport').append($('