Created
March 3, 2016 17:18
-
-
Save mbilski/cfbb9c60b92f9ef4b1af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
window.twttr = (function(d, s, id) { | |
var js, fjs = d.getElementsByTagName(s)[0], t = window.twttr || {}; | |
if (d.getElementById(id)) return t; | |
js = d.createElement(s); | |
js.id = id; | |
js.src = "https://platform.twitter.com/widgets.js"; | |
fjs.parentNode.insertBefore(js, fjs); | |
t._e = []; | |
t.ready = function(f) { | |
t._e.push(f); | |
}; | |
return t; | |
}(document, "script", "twitter-wjs")); | |
twttr.ready(function(twttr) { | |
$(".tweet").each(function() { | |
twttr.widgets.createTweet($(this).data("id"), $(this)[0], {cards: "hidden"}).then(function(el) { | |
$(el).contents().find('.EmbeddedTweet').css('max-width', '800px'); | |
}); | |
}); | |
}); | |
}); | |
<div class="tweet" data-id="705128887810965504"></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment