summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjelle van der Waa <jelle@vdwaa.nl>2018-01-22 18:41:25 +0100
committerAngel Velásquez <angvp@archlinux.org>2018-01-22 12:41:25 -0500
commitc79dc7dcf4a13e381a59a63c57590f2272aa0869 (patch)
treec8aed1fd5a3762af7bfb91ffa42a84259d3d2225
parent1e65142aeab9e24b8968f3915ef930386f04fed3 (diff)
downloadarchweb-c79dc7dcf4a13e381a59a63c57590f2272aa0869.tar.gz
archweb-c79dc7dcf4a13e381a59a63c57590f2272aa0869.zip
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.
-rw-r--r--sitestatic/archweb.css11
-rw-r--r--sitestatic/homepage.js12
-rw-r--r--sitestatic/konami.min.js4
-rw-r--r--sitestatic/vector_tux.pngbin165926 -> 0 bytes
-rw-r--r--templates/public/index.html3
5 files changed, 1 insertions, 29 deletions
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('<img src="' + image_src + '" alt=""/>');
- 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
--- a/sitestatic/vector_tux.png
+++ /dev/null
Binary files 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 %}
-<div id="konami" style="display:none;"></div>
{% load cdn %}{% jquery %}
<script type="text/javascript">
$(document).ready(function() {
- $.ajax({ url: "{% static "homepage.js" %}", cache: true, dataType: "script", success: function() { setupTypeahead(); setupKonami("{% static "vector_tux.png" %}"); } });
+ $.ajax({ url: "{% static "homepage.js" %}", cache: true, dataType: "script", success: function() { setupTypeahead(); } });
});
</script>
{% endblock %}