Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
source for roam/js snippet to append a meta element to head to tell twitter to render tweets with a dark theme
// adapted from https://github.com/wirtzdan/roam-js-extensions
// Twitter embed customization docs https://developer.twitter.com/en/docs/twitter-for-websites/webpage-properties
const meta = document.createElement('meta');
meta.name = "twitter:widgets:theme";
meta.content = "dark";
document.getElementsByTagName("head")[0].appendChild(meta);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment