Skip to content

Commit 2bcdcc3

Browse files
committed
(feat:JS) create alert_message variable
1 parent 617a6e6 commit 2bcdcc3

4 files changed

Lines changed: 7 additions & 4 deletions

File tree

public/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
CACHE_NAME_URL,
1717
CACHE_NAME_AUDIO,
1818
audioElement,
19+
alert_message
1920
} from "./js_utilities/functions_and_variables.js";
2021

2122
import {
@@ -133,7 +134,7 @@ sendToUserInbox.addEventListener("click", () => {
133134
}).then((response) => {
134135
if (response.ok) {
135136
console.log("image posted");
136-
alert("an email has been sent your inbox");
137+
alert(`${alert_message}`);
137138
return response.json();
138139
} else {
139140
throw new Error("Failed to post image");
@@ -148,7 +149,7 @@ sendToUserInboxBtn.addEventListener("click", () => {
148149
.then((response) => response.json())
149150
.then((data) => {
150151
if (data.emailStatus === "250 OK , completed") {
151-
alert("An email has been sent to your inbox");
152+
alert(`${alert_message}`);
152153
} else {
153154
alert("Invalid email address, try again");
154155
}

public/js_utilities/functions_and_variables.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
const CACHE_NAME_URL = "image-cache-v1";
44
const CACHE_NAME_AUDIO = "audio-cache-v2";
55
let audioElement = new Audio();
6+
let alert_message = "an email has been sent your inbox"
7+
68

79

810

@@ -162,4 +164,4 @@ function createAudio(data) {
162164

163165

164166

165-
export { defaultRecipe, CACHE_NAME_URL, audioElement, CACHE_NAME_AUDIO, cacheData, createQuery, displayElements, displayElementsFlex, displayElementsGrid, removeElements, emptyTheElement, resetCheckedStateToFalse, playAudio, pauseAudio, stopAudio, createAudio, createUserRecipe }
167+
export { defaultRecipe, CACHE_NAME_URL, audioElement, CACHE_NAME_AUDIO, alert_message, cacheData, createQuery, displayElements, displayElementsFlex, displayElementsGrid, removeElements, emptyTheElement, resetCheckedStateToFalse, playAudio, pauseAudio, stopAudio, createAudio, createUserRecipe }

public/url_folder.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
https://oaidalleapiprodscus.blob.core.windows.net/private/org-nYbqgo3O0LNnYYAoKAmApBfx/user-58Je7efi0iy880e2UYCdYpBm/img-fZ49pZbQpCxjm9FKRgrWUwV1.png?st=2024-08-01T13%3A04%3A59Z&se=2024-08-01T15%3A04%3A59Z&sp=r&sv=2023-11-03&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2024-07-31T23%3A34%3A47Z&ske=2024-08-01T23%3A34%3A47Z&sks=b&skv=2023-11-03&sig=jsB0y%2BY7/emg4Ic4UcC%2B3X%2BNip9uAN4c4p4cAx%2BGr%2B4%3D
1+
https://oaidalleapiprodscus.blob.core.windows.net/private/org-nYbqgo3O0LNnYYAoKAmApBfx/user-58Je7efi0iy880e2UYCdYpBm/img-1wpjmjhOyCV8QTN9mWJBvyFQ.png?st=2024-08-02T12%3A29%3A05Z&se=2024-08-02T14%3A29%3A05Z&sp=r&sv=2023-11-03&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2024-08-01T23%3A41%3A18Z&ske=2024-08-02T23%3A41%3A18Z&sks=b&skv=2023-11-03&sig=AcczkNo41h%2Bul%2B4Ud3ztnmq9qPvt2AYdUfBzHHUgAyM%3D

speech.mp3

181 KB
Binary file not shown.

0 commit comments

Comments
 (0)