Skip to content

Instantly share code, notes, and snippets.

@kurrik
Created March 31, 2014 17:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kurrik/9897183 to your computer and use it in GitHub Desktop.
Save kurrik/9897183 to your computer and use it in GitHub Desktop.
Including embedded Tweets in a Google Chrome extension
{
"manifest_version": 2,
"name": "crx-widgetsjs",
"description": "Load Twitter's widgets.js in a Chrome extension",
"version": "1.0",
"permissions": [
],
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html"
},
"content_security_policy": "script-src 'self' https://platform.twitter.com https://cdn.api.twitter.com https://syndication.twitter.com; object-src 'self'"
}
<!DOCTYPE html>
<html>
<head>
<meta name="twitter:widgets:csp" content="on" />
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<blockquote class="twitter-tweet" lang="en"><p>For me, working here is not about the money, but making a difference in the world <a href="http://t.co/zdQ1XEtXcS">pic.twitter.com/zdQ1XEtXcS</a></p>&mdash; Arne Roomann-Kurrik (@kurrik) <a href="https://twitter.com/kurrik/statuses/435860163233214464">February 18, 2014</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
</body>
</html>
body {
min-width: 300px;
}
@Sandeep-Bolla
Copy link

Is this one working?
@kurrik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment