{% extends "base.html" %}
{% block page-scripts %}
    <script type="text/javascript">
      var goLeft = function() {
          window.location.href = "/user/{{prev}}";
      };
      var goRight = function() {
          window.location.href = "/user/{{next}}";
      };
      $(".container").on("swipeleft", goLeft);
      $(".container").on("swiperight", goRight);
      // $(".container").on("swipe", function(){ console.log("swipe")});
    </script>
{% endblock %}

{% extends "base.html" %}
{% block page-scripts %}
    <script type="text/javascript">
      var goLeft = function() {
          window.location.href = "/user/{{prev}}";
      };
      var goRight = function() {
          window.location.href = "/user/{{next}}";
      };
      $(".container").on("swipeleft", goLeft);
      $(".container").on("swiperight", goRight);
      // $(".container").on("swipe", function(){ console.log("swipe")});

      $(document).keydown(function(e) {
          switch(e.which) {
              case 37: // left
              goLeft();

              case 39: // right
              goRight();

              default: return; // exit this handler for other keys
          }
          e.preventDefault(); // prevent the default action (scroll / move caret)
      });

      </script>
      {% endblock %}

Add support for left/right arrow keys switching users
Add support for left/right arrow keys switching users
