aboutsummaryrefslogtreecommitdiff
blob: bddb1aa0ec0038b80c3e8fde09fdd235cbe478a2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Generated by CoffeeScript 1.8.0
var load, putImages;

$(document).on("keydown", function(e) {
  if (e.keyCode === 39 && $("#js-next-post").length) {
    $("#js-next-post").click();
  }
  if (e.keyCode === 37 && $("#js-previous-post").length) {
    return $("#js-previous-post").click();
  }
});

$(document).on("click", "a[id]", function(e) {
  return _gaq.push(["_trackEvent", "Clicks", "clicked on " + e.target.id]);
});

$(document).on("click", "a:not([id])", function(e) {
  return _gaq.push(["_trackEvent", "Clicks", "clicked on " + $(this).text()]);
});

load = function() {
  return $(".img img").on("load", function() {
    return $(this).closest(".img").addClass("show");
  });
};

putImages = function(pics) {
  var box, pic;
  pic = pics[Math.floor(Math.random() * pics.length)];
  box = $(".instagram");
  box.html("");
  box.append("<a target='_blank' rel='noopener noreferrer' href='" + pic.link + "' class=img><img src='" + pic.images.low_resolution.url + "'></div>");
  return load();
};
Powered by cgit v1.2.3 (git 2.41.0)