-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathpopup.html
149 lines (148 loc) · 5.94 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
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
<!DOCTYPE html>
<html>
<head>
<title>Image to Text for ChatGPT Extension</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f0f0f0;
}
h2 {
color: #333;
background-color: #f9f9f9;
padding: 15px;
margin: 0;
border-bottom: 1px solid #ddd;
}
form {
margin: 15px;
}
.checkbox-option {
margin-bottom: 10px;
}
#save-button {
background-color: #4caf50; /* Green */
border: none;
color: white;
padding: 10px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 10px 2px;
cursor: pointer;
}
#notification {
padding: 15px;
background-color: #dff0d8;
color: #3c763d;
border: 1px solid #d6e9c6;
border-radius: 5px;
display: none; /* hidden by default */
}
footer {
bottom: 0;
width: 100%;
background-color: #f9f9f9;
border-top: 1px solid #ddd;
padding: 2px 0;
text-align: center;
}
.footer-button {
background-color: #1a576b;
border: none;
color: white;
padding: 5px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 5px;
cursor: pointer;
transition-duration: 0.4s;
width: 60%;
display: flex;
align-items: center;
justify-content: space-between;
}
.footer-button svg {
margin-left: 10px;
}
.footer-button:hover {
background-color: white;
color: black;
}
</style>
</head>
<body>
<h2>Image to Text for ChatGPT</h2>
<form>
<h3>Options:</h3>
<div class="checkbox-option">
<input type="checkbox" id="formatOutput" name="format-output" />
<label for="format-output">Try to perserve image spacing</label><br />
</div>
<div class="checkbox-option">
<input type="checkbox" id="showUploadButton" name="show-upload-button" />
<label for="show-upload-button">Show Upload Button</label><br />
</div>
<div class="checkbox-option">
<input type="checkbox" id="showLanguageButton" name="show-language-button" />
<label for="show-language-button">Show Pick Language Button</label><br />
</div>
<div class="checkbox-option">
<input type="checkbox" id="enableDirectPasting" name="enable-direct-pasting" />
<label for="enable-direct-pasting">Enable Direct Image Pasting</label><br />
</div>
<div class="checkbox-option">
<input type="checkbox" id="enableDragAndDrop" name="enable-drag-and-drop" />
<label for="enable-drag-and-drop">Enable Drag and Drop</label><br />
</div>
<div class="checkbox-option">
<input type="checkbox" id="showInitialLoadingMessage" name="show-initial-loading-message" />
<label for="show-initial-loading-message">Show Loading Popup</label><br />
</div>
<div class="checkbox-option">
<input type="checkbox" id="useThirdPartyOCR" name="use-third-party-ocr" />
<label for="use-third-party-ocr">Use outside advanced code-from-screenshot parser</label><br />
</div>
<h3>Theme:</h3>
<select id="theme" name="theme">
<option value="default-mode">Default Mode</option>
<option value="light-mode">Light Mode</option>
<option value="dark-mode">Dark Mode</option>
</select>
<button type="button" id="save-button">Save</button>
</form>
<div id="notification"></div>
</body>
<footer>
<a class="footer-button" href="https://github.com/tshetrim" target="_blank"
>GitHub
<svg xmlns="http://www.w3.org/2000/svg" width="42" height="42" viewBox="0 0 24 24">
<path
d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"
/>
</svg>
</a>
<a class="footer-button" href="https://discord.gg/8hnkBhwTJ5" target="_blank">
Discord
<svg
xmlns="http://www.w3.org/2000/svg"
width="42"
height="42"
fill="currentColor"
class="bi bi-discord"
viewBox="0 0 16 16"
>
<path
d="M13.545 2.907a13.227 13.227 0 0 0-3.257-1.011.05.05 0 0 0-.052.025c-.141.25-.297.577-.406.833a12.19 12.19 0 0 0-3.658 0 8.258 8.258 0 0 0-.412-.833.051.051 0 0 0-.052-.025c-1.125.194-2.22.534-3.257 1.011a.041.041 0 0 0-.021.018C.356 6.024-.213 9.047.066 12.032c.001.014.01.028.021.037a13.276 13.276 0 0 0 3.995 2.02.05.05 0 0 0 .056-.019c.308-.42.582-.863.818-1.329a.05.05 0 0 0-.01-.059.051.051 0 0 0-.018-.011 8.875 8.875 0 0 1-1.248-.595.05.05 0 0 1-.02-.066.051.051 0 0 1 .015-.019c.084-.063.168-.129.248-.195a.05.05 0 0 1 .051-.007c2.619 1.196 5.454 1.196 8.041 0a.052.052 0 0 1 .053.007c.08.066.164.132.248.195a.051.051 0 0 1-.004.085 8.254 8.254 0 0 1-1.249.594.05.05 0 0 0-.03.03.052.052 0 0 0 .003.041c.24.465.515.909.817 1.329a.05.05 0 0 0 .056.019 13.235 13.235 0 0 0 4.001-2.02.049.049 0 0 0 .021-.037c.334-3.451-.559-6.449-2.366-9.106a.034.034 0 0 0-.02-.019Zm-8.198 7.307c-.789 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.45.73 1.438 1.613 0 .888-.637 1.612-1.438 1.612Zm5.316 0c-.788 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.451.73 1.438 1.613 0 .888-.631 1.612-1.438 1.612Z"
/>
</svg>
</a>
<!-- <a class="footer-button" href="https://www.buymeacoffee.com/yourusername" target="_blank">Buy Me a Coffee</a> -->
</footer>
<script src="popup.js"></script>
</html>