-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.html
More file actions
165 lines (147 loc) · 5.34 KB
/
options.html
File metadata and controls
165 lines (147 loc) · 5.34 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
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Summarise Options</title>
<style>
body {
font-family: sans-serif;
padding: 10px 20px;
min-width: 500px; /* Increased width */
}
h1, h2 {
margin-bottom: 10px;
}
h2 {
margin-top: 25px;
border-top: 1px solid #ccc;
padding-top: 15px;
}
label {
display: block;
margin-top: 10px;
font-weight: bold;
}
input[type="text"], input[type="number"], textarea, select {
width: 95%; /* Adjusted width */
padding: 5px;
margin-top: 3px;
}
textarea {
min-height: 80px;
}
input[type="checkbox"] {
margin-right: 5px;
}
button {
margin-top: 10px;
padding: 8px 15px;
cursor: pointer;
}
#settingsForm button[type="submit"] {
margin-top: 20px;
}
ul {
list-style: none;
padding: 0;
margin-top: 5px;
}
li {
display: flex;
justify-content: space-between;
align-items: center;
padding: 5px 0;
border-bottom: 1px solid #eee;
}
li span {
margin-right: 10px;
}
li button {
margin-left: 10px;
padding: 3px 8px; /* Smaller remove buttons */
margin-top: 0; /* Reset margin */
}
.add-site-section {
margin-top: 10px;
display: flex;
align-items: center;
}
.add-site-section input[type="text"] {
flex-grow: 1;
margin-right: 10px;
width: auto; /* Let flexbox handle width */
}
.add-site-section button {
margin-top: 0; /* Reset margin */
}
.debug-section button {
margin-top: 0;
}
#speechSpeedValue {
margin-left: 10px;
}
/* Add style for pressed buttons */
.button-pressed {
background-color: #d3d3d3; /* Light grey background */
border-style: inset; /* Gives a 'pressed' look */
}
</style>
</head>
<body>
<h1>Summarise Settings</h1>
<form id="settingsForm">
<h2>API & Model Configuration</h2>
<label for="apiKey">API Key:</label>
<input type="text" id="apiKey" required>
<label for="model">Model:</label>
<select id="model"></select>
<label for="maxTokens">Max Tokens:</label>
<input type="number" id="maxTokens" required>
<label for="temperature">Temperature:</label>
<input type="number" id="temperature" step="0.1" min="0" max="1" required>
<label for="debug">
<input type="checkbox" id="debug">
Enable Debug Mode (shows alerts on error)
</label>
<h2>Prompts</h2>
<label for="youtubePrompt">YouTube Prompt:</label>
<textarea id="youtubePrompt" required></textarea>
<label for="textPrompt">Text Prompt:</label>
<textarea id="textPrompt" required></textarea>
<label for="prefacePrompt">Preface Prompt:</label>
<textarea id="prefacePrompt" required></textarea>
<label for="youtubePrefacePrompt">YouTube Preface Prompt:</label>
<textarea id="youtubePrefacePrompt" required></textarea>
<h2>Default Speech Settings</h2>
<label for="defaultVoice">Default Voice:</label>
<select id="defaultVoice"></select>
<label for="speechSpeed">Default Speech Speed (%):</label>
<div>
<input type="range" id="speechSpeed" min="50" max="150" value="100" style="vertical-align: middle;">
<span id="speechSpeedValue">100%</span>
</div>
<button type="submit" id="saveSettingsBtn">Save All Settings</button>
</form>
<h2>Popup Blocker Sites</h2>
<p>Add website origins (e.g., https://www.example.com) to stop page loading after initial HTML.</p>
<ul id="blockedSitesList"></ul>
<div class="add-site-section">
<input type="text" id="newSiteOrigin" placeholder="https://example.com">
<button id="addSiteBtn">Add Site</button>
</div>
<h2 class="debug-section">Debugging</h2>
<div style="margin-bottom: 15px;">
<label for="logLineLimit" style="display: inline;">Log Lines to Show:</label>
<input type="number" id="logLineLimit" min="10" max="1000" value="30" style="width: 80px; margin-left: 10px;">
</div>
<button id="downloadLogBtn">Download Debug Log</button>
<button id="clearLogBtn" style="margin-left: 10px; background-color: #e74c3c; color: white;">Clear Debug Log</button>
<button id="viewLogBtn" style="margin-left: 10px;">View Recent Logs</button>
<div id="logViewer" style="margin-top: 15px; display: none; border: 1px solid #ccc; padding: 10px; background-color: #f8f8f8;">
<h3>Recent Logs (<span id="logLinesShown">Last 30 lines</span>)</h3>
<pre id="logContent" style="max-height: 400px; overflow-y: auto; white-space: pre-wrap; word-wrap: break-word;"></pre>
<button id="closeLogViewerBtn" style="margin-top: 10px;">Close Viewer</button>
</div>
<script type="module" src="options.js"></script>
</body>
</html>