-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpopup.html
More file actions
156 lines (140 loc) · 4.15 KB
/
Copy pathpopup.html
File metadata and controls
156 lines (140 loc) · 4.15 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
<!DOCTYPE html>
<html>
<head>
<title>QueryFlip Settings</title>
<style>
html, body {
width: 320px;
height: 500px; /* Fixed height instead of min-height */
margin: 0;
padding: 0;
overflow-x: hidden;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
background-color: #f5f7fa;
/* Center the container both vertically and horizontally */
display: flex;
align-items: center;
justify-content: center;
padding: 0; /* Remove padding to ensure true centering */
height: 100%; /* Take full height of html */
}
.container {
background-color: white;
padding: 20px;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
width: 280px; /* Fixed width */
margin: 20px; /* Add margin instead of body padding */
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
}
/* Rest of the styles remain the same */
h3 {
color: #2d3748;
margin: 0;
font-size: 24px;
}
p {
color: #4a5568;
line-height: 1.5;
margin: 0;
}
.explanation {
font-size: 14px;
background-color: #f8fafc;
border-radius: 8px;
padding: 16px;
text-align: left;
width: 100%;
box-sizing: border-box;
}
.example {
font-style: italic;
color: #718096;
font-size: 13px;
margin-top: 8px;
}
.input-group {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
width: 100%;
}
label {
font-size: 14px;
color: #4a5568;
font-weight: 500;
}
input {
font-size: 16px;
width: 80px;
text-align: center;
padding: 8px;
border: 2px solid #e2e8f0;
border-radius: 6px;
transition: border-color 0.2s;
}
input:focus {
outline: none;
border-color: #4299e1;
}
button {
background-color: #000000;
color: white;
border: none;
padding: 10px 24px;
font-size: 16px;
border-radius: 6px;
cursor: pointer;
transition: background-color 0.2s;
font-weight: 500;
margin-top: 8px;
}
button:hover {
background-color: #333333;
}
#status {
color: #48bb78;
font-size: 14px;
display: none;
opacity: 1;
transition: opacity 0.3s ease-in-out;
margin-top: 8px;
}
.rule {
display: flex;
align-items: center;
gap: 8px;
margin: 4px 0;
}
</style>
</head>
<body>
<div class="container">
<h3>QueryFlip</h3>
<p>Automatically choose between Google and ChatGPT based on your query length</p>
<div class="explanation">
<strong>How it works:</strong><br>
<div class="rule">+ Shorter queries (below threshold) -> Google Search</div>
<div class="rule">+ Longer queries (at or above threshold) -> ChatGPT</div>
<div class="example">
Example with threshold set to 3 words:<br>
"weather today" -> Google<br>
"explain how photosynthesis works" -> ChatGPT
</div>
</div>
<div class="input-group">
<label for="wordCount">Word Count Threshold</label>
<input type="number" id="wordCount" min="1" value="3" />
<button id="save">Save</button>
</div>
<p id="status">Saved successfully!</p>
</div>
<script src="popup.js"></script>
</body>
</html>