🎨 Update main.js

Use classList.add() instead of classList.toggle() as we don't need to check if the class has been set.
This commit is contained in:
Carlos Cuesta 2016-11-08 17:53:57 +01:00 committed by GitHub
parent 799877e444
commit a09e285fc8

View File

@ -1,5 +1,5 @@
var statuses = ['joy', 'loved', 'haha', 'sunglasses', 'sexy', 'tongue'];
document.getElementById(statuses[Math.floor(Math.random() * statuses.length)]).classList.toggle('emoji-visible');
document.getElementById(statuses[Math.floor(Math.random() * statuses.length)]).classList.add('emoji-visible');
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-67824860-7', 'auto');
ga('send', 'pageview');