├── konami.jpg ├── bw-ajax-loader.gif ├── readme.md ├── style.css ├── index.html └── lib ├── getimagedata.js ├── konami-code.js ├── greyscale.js └── jquery.js /konami.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orangespaceman/konami-code/master/konami.jpg -------------------------------------------------------------------------------- /bw-ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orangespaceman/konami-code/master/bw-ajax-loader.gif -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Konami Code 2 | 3 | ## Post 4 | 5 | - [https://f90.co.uk/labs/konami-code/](https://f90.co.uk/labs/konami-code/) 6 | 7 | ## Example 8 | 9 | - [https://orangespaceman.github.io/konami-code](https://orangespaceman.github.io/konami-code) 10 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | html, 2 | body { 3 | margin:0; 4 | padding:0; 5 | background: #fff; 6 | } 7 | 8 | .image-wrap { 9 | position: relative; 10 | margin: 2em; 11 | } 12 | 13 | /* BW image container */ 14 | .bw-wrap { 15 | display:block; 16 | position:relative; 17 | } 18 | 19 | .bw-wrap img { 20 | position:absolute; 21 | left:0; 22 | top:0; 23 | } 24 | 25 | .bw-wrap img.bw { 26 | z-index:2; 27 | } 28 | 29 | .bw-wrap img.original { 30 | z-index:1; 31 | } 32 | 33 | .bw-wrap span.loader { 34 | display:block; 35 | position:absolute; 36 | left:0; 37 | top:0; 38 | width:100%; 39 | height:100%; 40 | background:url(./bw-ajax-loader.gif) no-repeat 10px 10px; 41 | background-color:rgba(200, 200, 200, 0.3); 42 | z-index:10; 43 | } -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Konami Code 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /lib/getimagedata.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery getImageData Plugin 0.1 3 | * http://www.maxnov.com/getimagedata 4 | * 5 | * Copyright 2010, Max Novakovic 6 | * Dual licensed under the MIT or GPL Version 2 licenses. 7 | * http://www.maxnov.com/getimagedata/#license 8 | * 9 | * Includes jQuery JSONP Core Plugin 2.1.2 10 | * http://code.google.com/p/jquery-jsonp/ 11 | * Copyright 2010, Julian Aubourg 12 | * Released under the MIT License. 13 | * 14 | * Date: Sat Feb 13 22:33:48 2010 GMT 15 | */ 16 | 17 | // jQuery JSONP Core Plugin 18 | // For source, see: http://jquery-jsonp.googlecode.com/files/jquery.jsonp-2.1.2.js 19 | (function(d,l){function w(){}function Q(a){p=[a]}function g(a,h,i){return a&&a.apply(h.context||h,i)}function x(a){function h(b){!j++&&l(function(){m();n&&(q[c]={s:[b]});y&&(b=y.apply(a,[b]));g(a.success,a,[b,z]);g(A,a,[a,z])},0)}function i(b){!j++&&l(function(){m();n&&b!=B&&(q[c]=b);g(a.error,a,[a,b]);g(A,a,[a,b])},0)}a=d.extend({},C,a);var A=a.complete,y=a.dataFilter,D=a.callbackParameter,E=a.callback,R=a.cache,n=a.pageCache,F=a.charset,c=a.url,e=a.data,G=a.timeout,o,j=0,m=w;a.abort=function(){!j++&& m()};if(g(a.beforeSend,a,[a])===false||j)return a;c=c||r;e=e?typeof e=="string"?e:d.param(e,a.traditional):r;c+=e?(/\?/.test(c)?"&":"?")+e:r;D&&(c+=(/\?/.test(c)?"&":"?")+escape(D)+"=?");!R&&!n&&(c+=(/\?/.test(c)?"&":"?")+"_"+(new Date).getTime()+"=");c=c.replace(/=\?(&|$)/,"="+E+"$1");n&&(o=q[c])?o.s?h(o.s[0]):i(o):l(function(b,k,s){if(!j){s=G>0&&l(function(){i(B)},G);m=function(){s&&clearTimeout(s);b[H]=b[t]=b[I]=b[u]=null;f[J](b);k&&f[J](k)};window[E]=Q;b=d(K)[0];b.id=L+S++;if(F)b[T]=F;var N=function(v){(b[t]|| w)();v=p;p=undefined;v?h(v[0]):i(M)};if(O.msie){b.event=t;b.htmlFor=b.id;b[H]=function(){b.readyState=="loaded"&&N()}}else{b[u]=b[I]=N;O.opera?(k=d(K)[0]).text="jQuery('#"+b.id+"')[0]."+u+"()":b[P]=P}b.src=c;f.insertBefore(b,f.firstChild);k&&f.insertBefore(k,f.firstChild)}},0);return a}var P="async",T="charset",r="",M="error",L="_jqjsp",t="onclick",u="on"+M,I="onload",H="onreadystatechange",J="removeChild",K="