From c93efda1b29ed8f05e21145afff1aadeb711f54a Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Mon, 26 Aug 2024 08:20:56 -0500 Subject: [PATCH] Always and only wrap text --- lib/plug/templates/debugger.html.eex | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/lib/plug/templates/debugger.html.eex b/lib/plug/templates/debugger.html.eex index 6bfc4e73..a9be370c 100644 --- a/lib/plug/templates/debugger.html.eex +++ b/lib/plug/templates/debugger.html.eex @@ -149,9 +149,8 @@ font-size: <%= :math.pow(1.3, -1) %>em; } - .wrap-text-checkbox-container { - display: flex; - gap: 6px; + .exception-details-text { + white-space: pre-wrap; } /* @@ -682,10 +681,7 @@ at <%= h method(@conn) %> <%= h @conn.request_path %> -
<%= h @message %>
-
- Wrap text? -
+
<%= h @message %>
<%= for %{label: label, encoded_handler: encoded_handler} <- @actions do %> @@ -845,8 +841,6 @@ var $copyBtn = document.querySelector('[role~="copy-to-markdown"]') var $copyBtnText = document.querySelector('[role~="copy-to-markdown-text"]') var $copy = document.querySelector('[role~="copy-contents"]') - var $exceptionDetailsText = document.querySelector('[role~="exception-details-text"]') - var $wrapTextCheckbox = document.querySelector('[role~="wrap-text-checkbox"]') each($items, function ($item) { on($item, 'click', itemOnclick) @@ -854,18 +848,9 @@ on($toggle, 'click', toggleOnclick) on($copyBtn, 'click', copyToClipboard) - on($wrapTextCheckbox, 'click', toggleWrapExceptionText) restoreToggle() - function toggleWrapExceptionText () { - if ($exceptionDetailsText.style.whiteSpace === 'pre-wrap') { - $exceptionDetailsText.style.whiteSpace = ''; - } else { - $exceptionDetailsText.style.whiteSpace = 'pre-wrap'; - } - } - function copyToClipboard () { if(navigator.clipboard) { // For those working on localhost or HTTPS