Here’s a fun little easter egg to add to your WordPress login screen: make it so when you click the “Remember Me” checkbox that the song of the same name from Coco autoplays at the bottom of the login form:
Here’s a quick and dirty plugin that does it:
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
<?php | |
/** | |
* Plugin Name: Remember Me | |
* Description: Play song from Coco when checking the Remember Me checkbox on the login screen. | |
* Plugin URI: https://gist.github.com/westonruter/86a191a898015f26e603d6594cc282d2 | |
* Author: Weston Ruter | |
* Author URI: https://weston.ruter.net | |
* Gist Plugin URI: https://gist.github.com/westonruter/86a191a898015f26e603d6594cc282d2 | |
*/ | |
add_action( 'login_footer', function() { | |
?> | |
<script> | |
document.addEventListener( 'DOMContentLoaded', function() { | |
var checkbox = document.getElementById( 'rememberme' ), coco; | |
coco = document.createElement( 'div' ); | |
coco.style.cssText = 'margin-top:50px; position:relative; width:100%; padding-bottom:57%;'; | |
coco.innerHTML = '<iframe style="position:absolute; width:100%; height:100%; left:0; top:0;" src="https://www.youtube.com/embed/ImutnoiBixY?autoplay=1&showinfo=0&controls=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>'; | |
checkbox.addEventListener( 'click', function() { | |
if ( checkbox.checked ) { | |
document.getElementById( 'loginform' ).appendChild( coco ); | |
} else { | |
coco.parentNode.removeChild( coco ); | |
} | |
} ); | |
} ); | |
</script> | |
<?php | |
} ); |
3 replies on “Remember Me Easter Egg”
Also, I suppose “never gonna give you up” could be another way of saying “remember me”?
That would mean rickrolling your users!
😉
“Don’t you (forget about me)” would work as well.