-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.js
28 lines (28 loc) · 1.89 KB
/
init.js
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
null === localStorage.getItem("gradesPublished") && localStorage.setItem("gradesPublished", "false"), $(".label_light") ? $(".label_light").length != $(".student_row").length && localStorage.setItem("gradesPublished", "true") : localStorage.setItem("gradesPublished", "true");
var message = "";
message = "false" == localStorage.getItem("gradesPublished") ? "Thanks for installing <a target='_blank' href='http://www.sriharshaguduguntla.com/easyloop'>Easy Loop</a>! There are currently no grades published. Please wait until grades are entered into the gradebook." : "Thanks for installing <a target='_blank' href='http://www.sriharshaguduguntla.com/easyloop'>Easy Loop</a>!", "true" != localStorage.getItem("showMessage") && null !== localStorage.getItem("showMessage") || Swal.mixin({
html: message,
imageUrl: chrome.extension.getURL("images/easyloop-logo.png"),
imageWidth: 200,
imageHeight: 200,
imageAlt: "Easyloop Logo",
showCancelButton: !0,
confirmButtonText: "Next →",
cancelButtonText: "Don't show again",
progressSteps: ["1", "2", "3"]
}).queue([{
title: "<strong>Welcome to Easy Loop 3.0!</strong>",
text: message
}, {
title: "<strong>Usage</strong>",
html: "Access your <strong>progress report</strong> for a class to begin calculating."
}, {
title: "<strong>Choose Theme</strong>",
html: "Choose a theme using the dropdown in the upper right corner."
}]).then(e => {
e.value ? Swal({
title: "All done!",
html: "Don't forget to leave a review for Easy Loop <a target='_blank' href='https://chrome.google.com/webstore/detail/school-loop-easy-loop/kkhpoabcjhecnadcnkgldgpfbncbjfjj?hl=en'>here</a>. Visit the <a target='_blank' href='http://sriharshaguduguntla.com/easyloop'>site</a> for more information.",
confirmButtonText: "Start"
}) : e.dismiss === Swal.DismissReason.cancel && localStorage.setItem("showMessage", "false")
});