/
popup.html
36 lines (32 loc) · 1.25 KB
/
popup.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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://ssl.gstatic.com/docs/script/css/add-ons.css">
<style>
label { display: inline; font-size: 14px; margin: 3px 5px; }
</style>
<base target="_top">
</head>
<body>
<h3>Configure Your Presentation</h3>
<p>In order to Tweet your slides, you'll need to launch the custom player in a new window.</p>
<form>
<label>Title: <input type="text" name="title" value="<?!= SlidesApp.getActivePresentation().getName(); ?>" /></label>
<label>Presentation ID: <input type="text" name="id" value="<?!= SlidesApp.getActivePresentation().getId(); ?>" /></label>
<hr />
<p>Append a hashtag to each tweet sent:</p>
<label>Hashtag:
<input type="text" name="hashtag" value="<?!= getProps(); ?>" /> </label>
<br />
<br />
<input type="button" value="Launch Player" class="action" onclick="google.script.run.withSuccessHandler(openPage).getUrl(this.parentNode)" />
</form>
<script>
function openPage(obj) {
console.log(obj);
var strWindowFeatures = "menubar=no,location=no,resizable=yes,scrollbars=yes";
window.open(obj.url, obj.title, strWindowFeatures);
}
</script>
</body>
</html>