This is a good-to-know piece of web development. Images, HTML, data objects can be rendered with a single URI.
The Hello world example of the URI data scheme is:
// copy this to the address bar data:text/html;charset=utf-8,Example 2: Do you see this RSS icon? Right click on it and press "inspect element" if you have Firebug, or check the source code, it's base 64 encoded image data.hello world
data:[So, what's the use of this?][;charset=" "][;base64],
Did you know what a small anchor link can do for you? More, than you might think. You can turn it into an advanced navigation on your website. There is nothing new in this, it was designed to do this. This only make sense, if the scrollbars are visible in your browser, isn't it? Well, no. Anchor links even work, when the invisible content is in an overflow: hidden container. The target element should have the same ID as the anchor link's href attribute.
Show contentThis is really nice, but this is too nice to be true. The bad guy this time is Opera. She refuses to play the game and anchoring simply doesn't work in overflow: hidden elements.Very very long text... images... forms... btw my over flow is hidden...I'm invisible by default, but your click just revealed me. :)
11
Read more
If you ever played any platform, fighting or combat games like Contra or Mortal Combat, then you will be familiar with the special key combinations for executions or special attacks that gives you some extra power, effect, or god mode. The Konami code was one of the fist cheat code in the video gaming history, that special combination later adapted by many games.
In the age of websites, many sites also installed small easter eggs for their visitors, just for fun. See the list here.
I played a little with implementing it, and just a few rows were enough to achieve the desired effect.
var p = 0;
var order = [38,38,40,40,37,39,37,39,66,65];
document.onkeyup = function(e)
{
var key = (window.event) ? event.keyCode : e.keyCode;
p = (order[p] == key) ? ++p : 0;
if( p == order.length ) alert('Boom, secrets unlocked');
};
All rights reserved, ©2008-2010 - Built on CodeIgniter framework - Konami codes - Mostly Valid XHTML 1.1 - Valid CSS 2.1