diff --git a/public/index.js b/public/index.js index 14e7ff7..f2409a1 100644 --- a/public/index.js +++ b/public/index.js @@ -85,6 +85,7 @@ $(document).ready(function() { // Load paste on page load async function loadPasteFromUrl() { + $viewer.text("Loading..."); const urlParams = new URLSearchParams(window.location.search); const pasteId = urlParams.get('id'); @@ -93,6 +94,7 @@ $(document).ready(function() { const response = await fetch(`/api/pastes/${pasteId}`); if (response.ok) { + $('pre').css('width', '100%'); // Set pre width const content = await response.text(); $editor.val(content); updateLineNumbers();