summaryrefslogtreecommitdiffstats
path: root/src/skin/js/firstRun.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:55:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:55:34 +0000
commit75417f5e3d32645859d94cec82255dc130ec4a2e (patch)
tree5fd46925c6b4a881c9208772ed8e5cc0588bc164 /src/skin/js/firstRun.js
parentInitial commit. (diff)
downloadprivacybadger-upstream.tar.xz
privacybadger-upstream.zip
Adding upstream version 2020.10.7.upstream/2020.10.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/skin/js/firstRun.js25
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));