From 65dd4a41812fd5201a92ee63b01980df25a5e707 Mon Sep 17 00:00:00 2001 From: Maxime Bonin Date: Fri, 7 Feb 2025 19:25:27 -0500 Subject: [PATCH] remove paste button --- client/web/index.html | 53 +++++++++++++++++++++++-------------------- client/web/script.js | 7 +----- 2 files changed, 29 insertions(+), 31 deletions(-) diff --git a/client/web/index.html b/client/web/index.html index 32ffd74..123c530 100644 --- a/client/web/index.html +++ b/client/web/index.html @@ -11,6 +11,9 @@ --text-color: black; --button-bg: #007bff; --button-hover: #0056b3; + --submit-bg: #007bff; /* Blue color for Submit (default) */ + --submit-hover: #0056b3; /* Darker blue for hover */ + --font-size: 16px; } body.dark-mode { @@ -18,6 +21,8 @@ --text-color: #ffffff; --button-bg: #ff9800; --button-hover: #e68900; + --submit-bg: #ff9800; /* Dark mode submit color */ + --submit-hover: #e68900; } body { @@ -41,29 +46,6 @@ transition: background 0.3s, color 0.3s; } - .paste-button { - position: absolute; - top: 5px; - right: 5px; - padding: 5px 10px; - font-size: 14px; - background-color: var(--button-bg); - color: white; - border: none; - border-radius: 5px; - cursor: pointer; - opacity: 0; - transition: opacity 0.3s ease-in-out, background 0.3s; - } - - .container:hover .paste-button { - opacity: 1; - } - - .paste-button:hover { - background-color: var(--button-hover); - } - /* Toggle Mode Button (Top-Right) */ #toggleModeButton { position: absolute; @@ -82,6 +64,28 @@ #toggleModeButton:hover { background-color: var(--button-hover); } + + /* Submit Button Styling */ + button { + font-size: 18px; + padding: 12px 20px; + margin-top: 10px; + background-color: var(--submit-bg); + color: white; + border: none; + border-radius: 8px; + cursor: pointer; + transition: background-color 0.3s ease, transform 0.2s ease; + } + + button:hover { + background-color: var(--submit-hover); + transform: scale(1.05); + } + + button:active { + transform: scale(1); + } @@ -91,8 +95,7 @@

Pastebin


diff --git a/client/web/script.js b/client/web/script.js index 7ae5cdf..c9b1be9 100644 --- a/client/web/script.js +++ b/client/web/script.js @@ -24,7 +24,6 @@ async function submitText() { let content; if (textData) { content = textData; - console.log(`content: {content}`); } else { alert("Please enter text to be saved"); return; @@ -118,11 +117,6 @@ async function displayPasteUrls() { } } -async function paste(input) { - const text = await navigator.clipboard.readText(); - input.value = text; -} - function toggleMode() { document.body.classList.toggle("dark-mode"); const isDark = document.body.classList.contains("dark-mode"); @@ -153,4 +147,5 @@ window.onload = function () { } else { document.getElementById("toggleModeButton").innerHTML = "🌙"; } + document.getElementById("pasteContent").focus(); };