summaryrefslogtreecommitdiffstats
path: root/src/skin/js/firstRun.js
blob: a21b24c33949e8aabb559c3bd9c6e712b5a83f50 (plain)
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
(function($) {

$(window).on("load", function () {

  function setSeenComic() {
    var badger = chrome.extension.getBackgroundPage().badger;
    var settings = badger.getSettings();
    settings.setItem("seenComic", true);
  }

  $(".scroll-it").smoothScroll();

  var alreadySet = false;
  $(window).scroll(function () {
    if (!alreadySet) {
      if ($(window).scrollTop() > 400) {
        alreadySet = true;
        setSeenComic();
      }
    }
  });
});


}(jQuery));