Created
August 14, 2015 19:43
-
-
Save williameliel/0cc6c6e9f7e9d8542594 to your computer and use it in GitHub Desktop.
Twit from Kim
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<div id="tweet"></div> | |
<script src="https://platform.twitter.com/widgets.js"></script> | |
<script> | |
twttr.ready(function() { | |
twttr.widgets.createTweet( | |
// Replace this with the Tweet ID | |
'632236948237606912', document.getElementById("tweet")) | |
.then(function(el) { | |
var e = el.contentDocument; | |
// Change the tweet text | |
var html = e.querySelector(".Tweet-text"); | |
html.innerHTML = ":) <a href='https://twitter.com/williamgarcia'>@williamgarcia</a> you funny AF, I <3 U"; | |
// Hide the Follow Button | |
// e.querySelector(".FollowButton").style.display = "none"; | |
// Change the retweet count | |
e.querySelector(".TweetAction--retweet .TweetAction-stat").innerHTML = "1423"; | |
// Change the favorites count | |
e.querySelector(".TweetAction--favorite .TweetAction-stat").innerHTML = "492"; | |
// Replace the date with text | |
// e.querySelector(".dt-updated").innerHTML = "Contact the author of this tweet at [email protected]"; | |
}); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment