File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
layout/_scripts/third-party/analytics Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ {% if theme.vkontakte_api .enable %}
2+
3+ <div id=" vk_api_transport" ></div>
4+ <script type=" text/javascript" >
5+ window.vkAsyncInit = function() {
6+ VK.init ({
7+ apiId: {{ theme.vkontakte_api .app_id }}
8+ });
9+
10+ {% if theme.vkontakte_api .like %}
11+ VK.Widgets .Like (" vk_like" , {type: " mini" , height: 20 });
12+ {% endif %}
13+
14+ {% if page.comments and theme.vkontakte_api .comments %}
15+ VK.Widgets .Comments (" vk_comments" , {limit: {{ theme.vkontakte_api .num_of_posts }}, attach: " *" });
16+ {% endif %}
17+ };
18+ setTimeout (function() {
19+ var el = document.createElement (" script" );
20+ el.type = " text/javascript" ;
21+ el.src = " //vk.com/js/api/openapi.js" ;
22+ el.async = true ;
23+ document.getElementById (" vk_api_transport" ).appendChild (el);
24+ }, 0 );
25+ </script>
26+
27+ {% endif %}
You can’t perform that action at this time.
0 commit comments