-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-page.html
More file actions
189 lines (170 loc) · 5.68 KB
/
Copy pathtest-page.html
File metadata and controls
189 lines (170 loc) · 5.68 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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>AI One-Click Rewrite Test Page</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
max-width: 800px;
margin: 0 auto;
padding: 20px;
line-height: 1.6;
background: #f8fafc;
}
.container {
background: white;
padding: 30px;
border-radius: 12px;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
h1 {
color: #1e293b;
margin-bottom: 20px;
}
.test-section {
margin: 30px 0;
padding: 20px;
border: 2px dashed #e2e8f0;
border-radius: 8px;
background: #f1f5f9;
}
.test-section h3 {
color: #475569;
margin-top: 0;
}
textarea {
width: 100%;
min-height: 120px;
padding: 15px;
border: 2px solid #e2e8f0;
border-radius: 8px;
font-size: 14px;
font-family: inherit;
resize: vertical;
}
input[type='text'] {
width: 100%;
padding: 12px;
border: 2px solid #e2e8f0;
border-radius: 8px;
font-size: 14px;
font-family: inherit;
}
.contenteditable {
border: 2px solid #e2e8f0;
border-radius: 8px;
padding: 15px;
min-height: 100px;
font-size: 14px;
background: white;
}
.contenteditable:focus {
outline: none;
border-color: #3b82f6;
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.instructions {
background: #dbeafe;
border: 1px solid #93c5fd;
border-radius: 8px;
padding: 15px;
margin-bottom: 20px;
}
.sample-text {
background: #fef3c7;
border: 1px solid #fbbf24;
border-radius: 8px;
padding: 15px;
margin: 10px 0;
font-style: italic;
}
</style>
</head>
<body>
<div class="container">
<h1>🤖 AI One-Click Rewrite Test Page</h1>
<div class="instructions">
<strong>Instructions:</strong>
<ol>
<li>Select any text in the editable areas below</li>
<li>Right-click and choose "Rewrite with AI"</li>
<li>Watch for the loading spinner and automatic text replacement</li>
</ol>
</div>
<div class="test-section">
<h3>📝 Test 1: Textarea (Form Field)</h3>
<textarea placeholder="Type or paste text here to test rewriting...">
Hi team, just wanted to touch base about the project. We need to sync up on the deliverables and make sure everyone is on the same page. Let me know when you're free to chat about this. Thanks!</textarea
>
</div>
<div class="test-section">
<h3>📄 Test 2: Text Input (Single Line)</h3>
<input
type="text"
value="Hey, can you please review my code when you get a chance? It's kinda urgent."
placeholder="Type text here..."
/>
</div>
<div class="test-section">
<h3>✏️ Test 3: ContentEditable Div (Rich Text)</h3>
<div class="contenteditable" contenteditable="true">
This is a contenteditable div where you can type, edit, and format text. Try selecting
some of this text and using the AI rewrite feature. The extension should work on any
editable content like this!
</div>
</div>
<div class="test-section">
<h3>🎯 Test 4: Another Textarea with Sample Text</h3>
<textarea>
I'm writing to inquire about the status of my application. I submitted it last week and haven't heard back yet. Could you please provide an update on the timeline? I'd really appreciate any information you can share.</textarea
>
</div>
<div class="test-section">
<h3>📧 Test 5: Email Draft Simulation</h3>
<div class="contenteditable" contenteditable="true">
<p><strong>Subject:</strong> Meeting Follow-up</p>
<p>Hi Sarah,</p>
<p>
Thanks for the meeting yesterday. I wanted to follow up on the action items we
discussed. Can you send me the documents we talked about? Also, when would be a good
time to schedule the next check-in?
</p>
<p>Best,<br />Alex</p>
</div>
</div>
<div class="sample-text">
<strong>💡 Sample texts to try:</strong>
<ul>
<li>"Can u help me with this asap? its pretty important and I need it done today."</li>
<li>
"The meeting was ok but could have been better organized and more focused on the main
issues."
</li>
<li>
"I think we should probably maybe consider looking into alternative solutions for this
problem."
</li>
</ul>
</div>
</div>
<script>
// Add some interactivity to help with testing
document.addEventListener('DOMContentLoaded', function () {
console.log('🤖 AI One-Click Rewrite Test Page loaded')
console.log('📝 Ready to test text rewriting on various editable elements')
// Log when text is selected
document.addEventListener('selectionchange', function () {
const selection = window.getSelection()
const selectedText = selection.toString().trim()
if (selectedText) {
console.log(
`📋 Text selected: "${selectedText.substring(0, 50)}${selectedText.length > 50 ? '...' : ''}"`
)
}
})
})
</script>
</body>
</html>