-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathCode.js
More file actions
36 lines (31 loc) · 871 Bytes
/
Code.js
File metadata and controls
36 lines (31 loc) · 871 Bytes
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
function onOpen(e) {
DocumentApp.getUi().createAddonMenu()
.addItem('Start', 'showSidebar')
.addToUi();
}
function showSidebar() {
var template = HtmlService.createTemplateFromFile('index');
var html = template.evaluate().setTitle('1i');
DocumentApp.getUi()
.showSidebar(html);
}
function results_run() {
looper();
results_show();
}
function results_clear() {
clearText();
showSidebar();
}
function results_show() {
var template = HtmlService.createTemplateFromFile('index');
var html = template.evaluate().setTitle('1i');
var number = number_oresults;
var full = ['<div class="results">',"<h3>Found", number ,"things to fix</h3>",
'<div class="highlights">',
results.join('\n'),
"</div>","</div>"].join('\n');
html.append(full);
DocumentApp.getUi()
.showSidebar(html);
}