Skip to content

Instantly share code, notes, and snippets.

@GraafG
Created October 14, 2018 00:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GraafG/8fad6f308570bfb7aa0f5feb9140f3b0 to your computer and use it in GitHub Desktop.
Save GraafG/8fad6f308570bfb7aa0f5feb9140f3b0 to your computer and use it in GitHub Desktop.
Unicorns (Chrome theme-color demo, chrome android header)
<!DOCTYPE html>
<html>
<head>
<title>Unicorns!</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="theme-color" content="#FF0000">
</head>
<body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script>
$(function() {
var i = 0;
var colors = ["#FF0000", "#FFFF00", "#00FF00", "#00FFFF", "#0000FF"];
setInterval(function() {
var color = colors[i = i++ > 4 ? 0 : i];
$("meta[name='theme-color']").attr('content', color);
$('body').css('background-color', color);
}, 500);
});
</script>
<style>.embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }</style>
<div class='embed-container'>
<iframe src='https://www.youtube.com/embed//jI-kpVh6e1U?autoplay=1&iv_load_policy=3&showinfo=0' frameborder='0' allowfullscreen></iframe>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment