diff --git a/static/app.js b/static/app.js index f8e7ed5..d2f1076 100755 --- a/static/app.js +++ b/static/app.js @@ -3161,10 +3161,30 @@ function updateCryptoPorftolio() { // SAVE FEATURES TO DISPLAY PROMPT FUNCTIONS +var savePromptTimeout; +var isSavePromptRunning = false; function displaySavePrompt() { + // Check if the function is already running + if (isSavePromptRunning) { + return; + } + isSavePromptRunning = true; document.getElementById('save-prompt-message').style.display = "block"; + var savePrompt = document.getElementById('save-prompt-p'); + // Store the original color + var originalColor = savePrompt.style.color; + // Set the new color for the transition effect + savePrompt.style.color = "yellow"; + // Clear any existing timeout + clearTimeout(savePromptTimeout); + // Add a delay before reverting back to the original color + savePromptTimeout = setTimeout(function() { + savePrompt.style.color = originalColor; + isSavePromptRunning = false; + },300); // 0.3 seconds } + function closeSavePrompt() { document.getElementById('save-prompt-message').style.display = "none"; }