From a09e285fc81d5e81163cb210f113fd4620d2a69e Mon Sep 17 00:00:00 2001 From: Carlos Cuesta Date: Tue, 8 Nov 2016 17:53:57 +0100 Subject: [PATCH] :art: Update main.js Use classList.add() instead of classList.toggle() as we don't need to check if the class has been set. --- src/scripts/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/main.js b/src/scripts/main.js index 8966d28..a8ea273 100644 --- a/src/scripts/main.js +++ b/src/scripts/main.js @@ -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');