diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 19:47:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 19:47:39 +0000 |
commit | 8d13bdc6cac0e20c43c6f909fc0208774b9c5c84 (patch) | |
tree | 5fd46925c6b4a881c9208772ed8e5cc0588bc164 /src/skin/js | |
parent | Initial commit. (diff) | |
download | privacybadger-8d13bdc6cac0e20c43c6f909fc0208774b9c5c84.tar.xz privacybadger-8d13bdc6cac0e20c43c6f909fc0208774b9c5c84.zip |
Adding upstream version 2020.10.7.upstream/2020.10.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/skin/js')
-rw-r--r-- | src/skin/js/firstRun.js | 25 |
1 files changed, 25 insertions, 0 deletions
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)); |