Skip to content

Instantly share code, notes, and snippets.

@6temes
6temes / fb_sdk.js
Last active October 22, 2019 18:38
Compatibility between Facebook Plugin and Turbolinks 5
// FacebookSDK
// https://developers.facebook.com/docs/plugins/page-plugin/
(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/sdk.js#xfbml=1&version=v2.8";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk')); // Replace 'facebook-jssdk' with your page id.
@tkompare
tkompare / responsiveGoogleMapAPI.html
Created October 19, 2012 02:40
A div for google.maps.Map() in a responsive design. Be sure to transfer the styles to your stylesheet.
<div style="display:inline-block; position:relative; width:100%;">
<div style="margin-top:100%;">
<div id="map" style="position:absolute; top:0; bottom:0; left:0; right:0;">
</div>
</div>
</div>