From 846f76a56fd37d8920638f4d34718e69b7e5e67f Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 1 Feb 2026 01:56:58 +0000 Subject: [PATCH] Add copy to clipboard button for response body in CORS Fetch Tester https://claude.ai/code/session_01R4jg9mhHPSUkdfxtnEmP6f --- cors-fetch.html | 86 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 80 insertions(+), 6 deletions(-) diff --git a/cors-fetch.html b/cors-fetch.html index b16af29..6c10dca 100644 --- a/cors-fetch.html +++ b/cors-fetch.html @@ -444,12 +444,45 @@ font-weight: 600; } + /* Body toolbar (format toggle + copy button) */ + .body-toolbar { + display: flex; + align-items: center; + justify-content: space-between; + gap: 8px; + margin-bottom: 8px; + } + + .copy-btn { + background: #e5e7eb; + color: #374151; + border: none; + border-radius: 6px; + padding: 5px 12px; + font-size: 0.82rem; + font-weight: 500; + cursor: pointer; + display: inline-flex; + align-items: center; + gap: 5px; + min-height: 30px; + transition: background 0.15s; + } + + .copy-btn:hover { + background: #d1d5db; + } + + .copy-btn.copied { + background: #dcfce7; + color: #166534; + } + /* JSON format toggle */ .format-toggle-row { display: flex; align-items: center; gap: 8px; - margin-bottom: 8px; } .format-toggle-row label { @@ -701,11 +734,17 @@

CORS Fetch Tester

Body Shown as text (UTF-8) -