From 8d13bdc6cac0e20c43c6f909fc0208774b9c5c84 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 21:47:39 +0200 Subject: Adding upstream version 2020.10.7. Signed-off-by: Daniel Baumann --- src/skin/js/firstRun.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/skin/js/firstRun.js (limited to 'src/skin/js') diff --git a/src/skin/js/firstRun.js b/src/skin/js/firstRun.js new file mode 100644 index 0000000..a21b24c --- /dev/null +++ b/src/skin/js/firstRun.js @@ -0,0 +1,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)); -- cgit v1.2.3