From c79dc7dcf4a13e381a59a63c57590f2272aa0869 Mon Sep 17 00:00:00 2001 From: jelle van der Waa Date: Mon, 22 Jan 2018 18:41:25 +0100 Subject: Remove Konami code functionality (#77) Remove the easteregg on the home page which shows a tux when a user enters the Konami code. Which reduces maintenance of a non-critical component. --- sitestatic/archweb.css | 11 ----------- sitestatic/homepage.js | 12 ------------ sitestatic/konami.min.js | 4 ---- sitestatic/vector_tux.png | Bin 165926 -> 0 bytes templates/public/index.html | 3 +-- 5 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 sitestatic/konami.min.js delete mode 100644 sitestatic/vector_tux.png diff --git a/sitestatic/archweb.css b/sitestatic/archweb.css index d8c66aa3..7765edef 100644 --- a/sitestatic/archweb.css +++ b/sitestatic/archweb.css @@ -608,17 +608,6 @@ div.widget { margin-bottom: 1.5em; } -/* home: other stuff */ -#konami { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - text-align: center; - opacity: 0.6; -} - /* feeds page */ #rss-feeds .rss { padding-right: 20px; diff --git a/sitestatic/homepage.js b/sitestatic/homepage.js index 48dab93f..3ce1c8fd 100644 --- a/sitestatic/homepage.js +++ b/sitestatic/homepage.js @@ -28,15 +28,3 @@ function setupTypeahead() { } }); } - -function setupKonami(image_src) { - var konami = new Konami(function() { - $('#konami').html(''); - setTimeout(function() { - $('#konami').fadeIn(500); - }, 500); - $('#konami').click(function() { - $('#konami').fadeOut(500); - }); - }); -} diff --git a/sitestatic/konami.min.js b/sitestatic/konami.min.js deleted file mode 100644 index f69ca4ff..00000000 --- a/sitestatic/konami.min.js +++ /dev/null @@ -1,4 +0,0 @@ -var Konami=function(t){var e={addEvent:function(t,e,n,i){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&(t["e"+e+n]=n,t[e+n]=function(){t["e"+e+n](window.event,i)},t.attachEvent("on"+e,t[e+n]))},input:"",pattern:"3838404037393739666513",load:function(t){this.addEvent(document,"keydown",function(n,i){return i&&(e=i),e.input+=n?n.keyCode:event.keyCode,e.input.length>e.pattern.length&&(e.input=e.input.substr(e.input.length-e.pattern.length)),e.input==e.pattern?(e.code(t),e.input="",void 0):void 0},this),this.iphone.load(t)},code:function(t){window.location=t},iphone:{start_x:0,start_y:0,stop_x:0,stop_y:0,tap:!1,capture:!1,orig_keys:"",keys:["UP","UP","DOWN","DOWN","LEFT","RIGHT","LEFT","RIGHT","TAP","TAP","TAP"],code:function(t){e.code(t)},load:function(t){this.orig_keys=this.keys,e.addEvent(document,"touchmove",function(t){if(1==t.touches.length&&e.iphone.capture===!0){var n=t.touches[0] - e.iphone.stop_x=n.pageX,e.iphone.stop_y=n.pageY,e.iphone.tap=!1,e.iphone.capture=!1,e.iphone.check_direction()}}),e.addEvent(document,"touchend",function(){e.iphone.tap===!0&&e.iphone.check_direction(t)},!1),e.addEvent(document,"touchstart",function(t){e.iphone.start_x=t.changedTouches[0].pageX,e.iphone.start_y=t.changedTouches[0].pageY,e.iphone.tap=!0,e.iphone.capture=!0})},check_direction:function(t){var e=Math.abs(this.start_x-this.stop_x),n=Math.abs(this.start_y-this.stop_y),i=0>this.start_x-this.stop_x?"RIGHT":"LEFT",o=0>this.start_y-this.stop_y?"DOWN":"UP",s=e>n?i:o - s=this.tap===!0?"TAP":s,s==this.keys[0]&&(this.keys=this.keys.slice(1,this.keys.length)),0==this.keys.length&&(this.keys=this.orig_keys,this.code(t))}}} -return"string"==typeof t&&e.load(t),"function"==typeof t&&(e.code=t,e.load()),e} diff --git a/sitestatic/vector_tux.png b/sitestatic/vector_tux.png deleted file mode 100644 index ab4be6d0..00000000 Binary files a/sitestatic/vector_tux.png and /dev/null differ diff --git a/templates/public/index.html b/templates/public/index.html index d3ca90e6..9242263e 100644 --- a/templates/public/index.html +++ b/templates/public/index.html @@ -203,12 +203,11 @@ {% endblock %} {% block script_block %} - {% load cdn %}{% jquery %} {% endblock %} -- cgit v1.2.2