forked from iliakan/es5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
misc.js
50 lines (40 loc) · 1.53 KB
/
misc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
!function(d,s,id){
var js,fjs=d.getElementsByTagName(s)[0];
if(!d.getElementById(id)){
js=d.createElement(s);js.id=id;
js.src="//platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js,fjs);
}
}(document,"script","twitter-wjs");
window.___gcfg = {lang: 'ru'};
(function() {
if (document.getElementById('gplus')) return;
var po = document.createElement('script'); po.id = 'gplus'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
(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/ru_RU/all.js#xfbml=1&appId=112959575461438";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
setTimeout(function() {
var toggler = document.getElementById('share-toggler');
var slogan = document.getElementById('slogan');
if (window.localStorage) {
slogan.className = localStorage.sloganClass;
}
toggler.onclick = function() {
slogan.className = (slogan.className == "share-close") ? "" : "share-close";
if (window.localStorage) {
localStorage.sloganClass = slogan.className;
}
}
}, 0);
window.VK && document.write(VK.Share.button({
url: "http://es5.javascript.ru/",
title: "EcmaScript 5 на русском",
image: "http://es5.javascript.ru/ecma.png",
noparse: true}, { type: "round", text: 'Поделиться' }));