easter egg

From IndieWeb


An easter egg is an (often small) undocumented feature, many are small jokes, in software or services, including on a few IndieWeb sites.

Why

Because it’s fun. principle 11.

Konami Code

Konami Code is a cheat code originating from 80s Konami video games, these days used as reference, or as an actual, functioning Easter egg on websites: up, up, down, down, left, right, left, right, b, a.

This is vanilla JS, no framework is needed.

function kcl(cb) {
  var input = '';
  var key = '38384040373937396665';
  document.addEventListener('keydown', function (e) {
    input += ("" + e.keyCode);
    if (input === key) {
      return cb();
    }
    if (!key.indexOf(input)) return;
    input = ("" + e.keyCode);
  });
}

kcl(function () {
    // do something here
})

IndieWeb Examples

Read any of the below at your own risk. You may want to go hunting yourself!

Martijn van der Ven

Martijn van der Ven has the following easter eggs on his homepage:

Easter egg 1

On any touch enabled devices (or browsers sending touch events for inputs) you can swipe right to trigger an window.alert().

This is active as of 2017-08-20.

Easter egg 2

Forever 18: there is a 9% chance that my age will display as 18 years old, with a non-base-10 modifier on it.

This is active as of 2019-05-05.

Easter egg 3

Entering the Konami Code on the h-card will trigger an window.alert() containing an old-school Geek Code.

This is active as of 2019-10-20.

Easter egg 4

Going to the URL /8675 returns an HTTP 309 response. It will show the formula for OEIS sequence A182369, which embeds the phone number 867-5309/Jenny in its output.

This is active as of 2017-06-30 (at the latest).

Peter Molnar

Added an experimental, incredibly ugly, alternative style sheet, which is activated by Konami Code.

fluffy

fluffy's site has quite a few animated error pages, complete with theme songs. Try to generate a 403, 404, or 4xx error yourself. (If you give up, here are spoilers.)

capjamesg

capjamesg has a rotating set of messages on his homepage that change on refresh. These messages appear above his sparkline. Examples as of 2023-02-10 include:

  • "Amateur fruit connoisseur."
  • "It's me. Hi. I'm the problem it's me."
  • "Perpetually curious."

Previously

capjamesg's website used to have a custom Konami code activated using the following sequence:

  • Up
  • Down
  • Up
  • Down
  • Up
  • Down

The Konami code triggers a change in the HTML inside an announcement banner that is used to show featured posts on his blog. The announcement banner appears on all pages.

Visitors can press the escape key to reset the Konami code if they make a mistake when tying it in or if they have already pressed other keys before trying the code.

The code that powers his Konami code is based on the first example:

function konami() {
    var input = "";
    var code = "384038403840";
    document.addEventListener("keydown", function(e) {
        if (e.keyCode.toString() === "27") {
            input = "";
        } else {
            input += e.keyCode.toString();
            if (input === code) {
                const announcement = document.getElementsByClassName("announcement")[0];
                announcement.innerHTML = "<p style='color:white;'><b>You have found the secret.</b></p>"
            }
        }
    })
}

konami();

aaronpk

Aaron Parecki's website has an easter egg if you type the Konami code.

There is also a screensaver easter egg if you leave any page open for 2 minutes without moving your mouse. The cheat code for this easter egg to trigger it manually is to move your mouse to the top left corner of the page.

Jan-Lukas Else

Jan-Lukas Else has an easter egg on his sites that gets triggered by the Konami code. If you want to see the page the right way around again, you have to enter the Konami code once more.

Q4.re

Arne Govaerts whoami section changes into '80s chaos when you type the Konami code.

gRegor Morrill

gRegor Morrill has an easter egg if you try to browse future archives or before a certain past date:

Spoiler: Example 1Use a future year like https://gregorlove.com/2050/, then click the "TARDIS" acronym text to play audio

Spoiler: Example 2Use a past year before, say, 1978: https://gregorlove.com/1977/, then click the "TARDIS" acronym to play audio

benji

benji has added a few easter eggs to benji.dog:

Easter egg 1

There's a small chance a red pixel will show up somewhere on any page. Clicking it adds some style to the text.

Date added: 2018-11-28

Easter egg 2

Check the console.

Date added: 2021-08-03

Easter egg 3

There is a page that will show a 🐝 flying around the screen for every webmention received the site has received.

Date added: 2023-01-26

Add yourself

Hit edit on this section if you want to add yourself without spoiling other people’s easter eggs for yourself!

Add a new section above the === Add yourself === line, e.g. === Your Name ===. You can use the following mark-up to hide your easter egg descriptions from viewers:

<raw><details><summary>Easter egg title</summary></raw>

Describe it here.

<raw></details></raw>

See Also