diff --git a/web-client/script.js b/web-client/script.js index f6af0a9..24f5342 100644 --- a/web-client/script.js +++ b/web-client/script.js @@ -23,7 +23,6 @@ function displayResult(result) { if (result.hasOwnProperty('error')) { resultContainer.append('
' + result.error + '
'); } else { - // Update the text area with the modified URL $('#url').val(result.after.replace(/&/g, '&')); } } @@ -34,19 +33,17 @@ function displayError(error) { resultContainer.append('Error: ' + error + '
'); } -// Function to reset the session function resetSession() { var resultContainer = $('#result-container'); var textArea = $('#url'); $.ajax({ type: 'POST', - url: '../server/reset_session.php', // Adjust the path accordingly + url: '../server/reset_session.php', success: function () { alert('Session has been reset.'); - resultContainer.empty(); // Clear the error display - textArea.val(''); // Clear the text area - // You can perform additional actions after resetting the session if needed + resultContainer.empty(); + textArea.val(''); }, error: function (xhr, status, error) { console.error('Error resetting session:', error);