-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.html
More file actions
154 lines (138 loc) · 4.8 KB
/
options.html
File metadata and controls
154 lines (138 loc) · 4.8 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
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>SnapGPT – Options</title>
<style>
body {
font: 14px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
margin: 24px;
background: #121212;
color: #e0e0e0;
}
.card {
border: 1px solid #333;
border-radius: 10px;
max-width: 760px;
background: #1e1e1e;
padding: 0;
margin: 0;
transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
transform: translateY(-2px);
}
.card summary {
cursor: pointer;
padding: 16px;
font-size: 16px;
font-weight: 600;
list-style: none;
}
.card[open] > summary {
border-bottom: 1px solid #333;
margin-bottom: 8px;
}
.card .content {
padding: 0 16px 16px 16px;
}
code {
background: #2d2d2d;
padding: 2px 6px;
border-radius: 6px;
color: #f0f0f0;
}
a.button {
display: inline-block;
padding: 8px 12px;
border-radius: 8px;
text-decoration: none;
background: #10a37f;
color: #fff;
border: none;
transition: background 0.2s;
}
a.button:hover {
background: #0d8c6d;
}
a {
color: #58a6ff;
}
a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<h1>SnapGPT</h1>
<details class="card" open>
<summary>AI Provider</summary>
<div class="content">
<p>Select the AI you want to use for screenshot uploads.</p>
<div id="ai-provider-selection">
<label>
<input type="radio" name="ai-provider" value="chatgpt" checked>
ChatGPT
</label>
<br>
<label>
<input type="radio" name="ai-provider" value="gemini">
Google Gemini
</label>
</div>
<p id="save-status" style="color: #10a37f;"></p>
</div>
</details>
<details class="card" open style="margin-top:16px;">
<summary>Keyboard Shortcut</summary>
<div class="content">
<p>
Chrome requires changing extension shortcuts at
<code>chrome://extensions/shortcuts</code>.
</p>
<p>
Open the shortcuts page:
<a class="button" href="chrome://extensions/shortcuts" target="_blank" rel="noreferrer">Open shortcuts</a>
</p>
<p>
Look for <strong>“Capture current tab & upload to ChatGPT”</strong> and set your preferred keybinding.
</p>
</div>
</details>
<details class="card" style="margin-top:16px;">
<summary>Behavior</summary>
<div class="content">
<ul>
<li>Captures the visible area of the active tab (Chrome API limitation).</li>
<li>Reuses an existing ChatGPT tab if present; otherwise opens a new one.</li>
<li>Uploads the screenshot and attempts to auto-send.</li>
</ul>
</div>
</details>
<details class="card" style="margin-top:16px;">
<summary>Troubleshooting</summary>
<div class="content">
<h3>If the hotkey doesn't work:</h3>
<ol>
<li>Make sure the extension is enabled on <a href="chrome://extensions"
target="_blank">chrome://extensions</a></li>
<li>Verify no other extension uses the same keyboard shortcut</li>
<li>Try using the extension icon in the toolbar as an alternative</li>
<li>Check the browser console for errors (right-click > Inspect > Console)</li>
<li>For advanced troubleshooting, view the service worker logs:
<ul>
<li>Go to <a href="chrome://extensions" target="_blank">chrome://extensions</a></li>
<li>Enable "Developer mode" (top right)</li>
<li>Click "service worker" link under this extension</li>
<li>Look for debug messages or errors in the console</li>
</ul>
</li>
<li>Try our <a href="test.html" target="_blank">test page</a> to see if the extension works there</li>
</ol>
Version Number: 1.0.2
</div>
</details>
<script src="options.js"></script>
</body>
</html>