Created
February 6, 2016 16:45
-
-
Save richplastow/6b05b4b11888aa3b7269 to your computer and use it in GitHub Desktop.
`flert()` favicon-alert in red, orange, yellow, green or black
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>`flert()` Gist</title> | |
<link rel=icon href=data:text;base64,Qk0eAAAAAAAAABoAAAAMAAAAAQABAAEAGAAAZhEA> | |
<script>function flert(s){try{var l=document.querySelector('link[rel=icon]');l | |
.href=l.href.substr(0,53)+'APgP///4AA'.substr(s*2,2)+'AA'}catch(e){}}</script> | |
</head> | |
<body> | |
<h1><tt>flert()</tt></h1> | |
<h4>Favicon-alert in…</h4> | |
<button onclick="flert(0)"><tt>flert(0);</tt> Red</button><br> | |
<button onclick="flert(1)"><tt>flert(1);</tt> Orange</button><br> | |
<button onclick="flert(2)"><tt>flert(2);</tt> Yellow</button><br> | |
<button onclick="flert(3)"><tt>flert(3);</tt> Green</button><br> | |
<button onclick="flert(4)"><tt>flert(4);</tt> Black</button><br> | |
<h4>Works in:</h4> | |
<ul> | |
<li>Firefox</li> | |
<li>Safari</li> | |
<li>Opera</li> | |
<li>Chrome</li> | |
</ul> | |
<h4>Does not work:</h4> | |
<ul> | |
<li>Edge</li> | |
<li>Internet Explorer</li> | |
<li>Yandex</li> | |
</ul> | |
<p>…no error is thrown when a call to <tt>flert()</tt> fails. </p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment