MediaWiki:Common.js: Rozdiel medzi revíziami
Z MBI
(14 intermediate revisions by the same user not shown) | |||
Riadok 1: | Riadok 1: | ||
/* Tu uvedený JavaScript sa nahrá všetkým používateľom pri každom nahraní stránky. */ | /* Tu uvedený JavaScript sa nahrá všetkým používateľom pri každom nahraní stránky. */ | ||
(function () { | (function () { | ||
+ | var myElement = document.getElementById('mwFacebookWindow'); | ||
+ | if(myElement) { | ||
+ | myElement.innerHTML = '<div id="fb-root"></div>' | ||
+ | + ' <div style="width:30%; max-width: 350px; min-width: 250px; padding:30px; float:right;">' | ||
+ | + ' <div class="fb-page" data-href="https://www.facebook.com/Met%C3%B3dy-v-bioinformatike-1665945363718785/" data-tabs="timeline"' | ||
+ | + ' data-height="600" data-small-header="true" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="false"></div>' | ||
+ | + ' </div>' | ||
+ | facebook(document, "script", "facebook-jssdk"); | ||
+ | } | ||
+ | }()); | ||
− | + | function facebook(d, s, id) { | |
− | + | ||
− | + | ||
− | + | ||
var js, fjs = d.getElementsByTagName(s)[0]; | var js, fjs = d.getElementsByTagName(s)[0]; | ||
if (d.getElementById(id)) return; | if (d.getElementById(id)) return; | ||
Riadok 11: | Riadok 18: | ||
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.5"; | js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.5"; | ||
fjs.parentNode.insertBefore(js, fjs); | fjs.parentNode.insertBefore(js, fjs); | ||
− | } | + | } |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + |
Aktuálna revízia z 13:26, 23. september 2016
/* Tu uvedený JavaScript sa nahrá všetkým používateľom pri každom nahraní stránky. */ (function () { var myElement = document.getElementById('mwFacebookWindow'); if(myElement) { myElement.innerHTML = '<div id="fb-root"></div>' + ' <div style="width:30%; max-width: 350px; min-width: 250px; padding:30px; float:right;">' + ' <div class="fb-page" data-href="https://www.facebook.com/Met%C3%B3dy-v-bioinformatike-1665945363718785/" data-tabs="timeline"' + ' data-height="600" data-small-header="true" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="false"></div>' + ' </div>' facebook(document, "script", "facebook-jssdk"); } }()); function facebook(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/sdk.js#xfbml=1&version=v2.5"; fjs.parentNode.insertBefore(js, fjs); }