-
-
Notifications
You must be signed in to change notification settings - Fork 921
Webby easter egg #2196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webby easter egg #2196
Conversation
@@ -1,6 +1,21 @@ | |||
'use strict'; | |||
|
|||
window.onload = () => { | |||
const webby = document.getElementsByClassName('webby')[0]; | |||
const web = document.getElementsByClassName('web')[0]; | |||
webby.className += ' calm'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
webby.classList.add('calm');
?
webby.className += ' calm'; | ||
web.className += ' calm'; | ||
webby.addEventListener('click', () => { | ||
if (-1 === webby.className.indexOf('frighten')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (-1 !== webby.className.indexOf('frighten')) {
return;
}
web.className += ' calm'; | ||
webby.addEventListener('click', () => { | ||
if (-1 === webby.className.indexOf('frighten')) { | ||
webby.className = webby.className.replace('calm', 'frighten'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
webby.classList.replace('calm', 'frighten');
? (same after)
Failing test is not related (seems to be a deprecated in Doctrine). |
* Webby easter egg * Fix style and name * Fix review comments
* Webby easter egg * Fix style and name * Fix review comments
Webby is a little more alive! 🕸️ Enjoy!