-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathheader-additions.html
More file actions
40 lines (38 loc) · 1.23 KB
/
header-additions.html
File metadata and controls
40 lines (38 loc) · 1.23 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
<style type="text/css" media="print">
body { visibility: hidden; display: none }
</style>
<script type="text/javascript">
function createCookie(name, value, days) {
var expires;
if (days) {
var date = new Date();
date.setTime(date.getTime() + (7 * 24 * 60 * 60 * 1000));
expires = "; expires=" + date.toGMTString();
}
else {
expires = "";
}
document.cookie = name + "=" + value + expires + "; path=/";
}
function getCookie(c_name) {
if (document.cookie.length > 0) {
c_start = document.cookie.indexOf(c_name + "=");
if (c_start != -1) {
c_start = c_start + c_name.length + 1;
c_end = document.cookie.indexOf(";", c_start);
if (c_end == -1) {
c_end = document.cookie.length;
}
return unescape(document.cookie.substring(c_start, c_end));
}
}
return "";
}
window.onload = () => {
if (getCookie('popupShown') != 'yes') {
const myModal = new bootstrap.Modal('#exampleModal');
myModal.show();
createCookie('popupShown', 'yes', 1)
}
}
</script>