-
Notifications
You must be signed in to change notification settings - Fork 1
/
sidebar.html
79 lines (73 loc) · 2.08 KB
/
sidebar.html
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!DOCTYPE html>
<html>
<head>
<base target="_top">
<style>
div.button-holder {
padding: 8px;
width: 100%;
box-sizing: border-box;
}
div.button-holder > button {
border-radius: 3px;
background: #002E5D;
color: white;
padding: 8px;
display: block;
border: none;
width: 100%;
}
div.button-holder > button:hover {
background: #003366;
cursor: pointer;
box-shadow: 0 0 2px 1px #0062B8;
}
div.button-holder > p.description {
color: #0d0d0d;
margin-bottom: 4px;
margin-top: 0;
}
div#footer {
color: #ffffff;
background: #002E5D;
text-align: center;
position: absolute;
bottom: 0;
left: 0;
right: 0;
padding: 8px;
box-sizing: border-box;
}
</style>
</head>
<body>
<div class="button-holder">
<p class="description">Inserts an example number surrounded by parentheses and updates all example numbers in the document.</p>
<button id="insert-reference">Insert Example Number</button>
</div>
<div class="button-holder">
<p class="description">Updates all example numbers so that they are sequential throughout the document.</p>
<button id="refresh">Update Example Numbers</button>
</div>
<div id="footer">
© <span id="year"></span> Seth and Earl Brown
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
/**
* On document load, assign click handlers to each button.
*/
$(function() {
$('#insert-reference').click(insertReference);
$('#refresh').click(refreshReferences);
$("#year").text(new Date().getFullYear());
});
function insertReference() {
google.script.run.insertReference();
}
function refreshReferences() {
google.script.run.refreshReferences();
}
</script>
</body>
</html>