"use strict";

$(document).on(
  'keydown', function(event) {
      if (event.key == "Escape") {
          let loc = window.location.href;
          // Trigger the change of window URL only in case that the
          // enlarged picture is now active.
          if (/#.+?$/.test(loc)) {
              window.location.href = "#";
          }
      }
});
