Skip to content

Commit

Permalink
Message updated
Browse files Browse the repository at this point in the history
ekqiu committed May 4, 2024
1 parent 1b43f0d commit 5f32ee2
Showing 2 changed files with 11 additions and 11 deletions.
9 changes: 6 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
@@ -36,8 +36,7 @@ <h1>The BPSC Persona</h1>
<button id="progress">Start</button>
</div>

<div id="persona" style="display: none;"><canvas id="personaa"></canvas><br><button id="download">Save
Image</button><button id="shareFileBtn">Share Image</button>
<div id="persona" style="display: none;"><canvas id="personaa"></canvas><br><button id="shareFileBtn">Share Image</button>
<a>
Thank you for taking the quiz! Download and share your persona with your friends!
</a></div>
@@ -62,7 +61,11 @@ <h5 class="modal-title" id="exampleModalLongTitle">A message from Evan:</h5>
</button>
</div>
<div class="modal-body">
Hi BPSC! Thank you for all the memories and fun times we had together. I hope you enjoy this quiz and have a good laugh! <br><br>
Dear BPSC, I want to express my heartfelt gratitude for the countless wonderful memories I’ve created during
this journey. Although I may not have been close to everyone, BPSC will forever remain a core memory in my life. I hope
that by taking this persona quiz, we can connect with peers who share similar a similar mindset. <br><br>I would like to thank my friends
for making this jouney an unforgettable one, the teachers for their patience, guidance and support, the EXCOs that I've been working with
the past year for being the best team I could ask for, and you, for being a part of this journey with me. <br><br>Your 41st HAA, signing off :)
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
13 changes: 5 additions & 8 deletions script.js
Original file line number Diff line number Diff line change
@@ -258,14 +258,6 @@ document.getElementById("progress").addEventListener("click", function () {
}
});

document.getElementById("download").addEventListener("click", function () {
const canvas = document.getElementById("personaa");
const image = canvas.toDataURL("image/png");
const link = document.createElement("a");
link.href = image;
link.download = "persona.png";
link.click();
});
window.addEventListener("DOMContentLoaded", function () {
$("#exampleModalCenter").modal("show");
});
@@ -284,6 +276,10 @@ async function shareImage(imageUrl) {
navigator.share(shareData);
} catch (error) {
console.error("Error sharing the image: ", error);
const link = document.createElement("a");
link.href = imageUrl;
link.download = "persona.png";
link.click();
}
}

@@ -312,3 +308,4 @@ function preloadImages() {

// Call the preloadImages function to preload the images
preloadImages();

0 comments on commit 5f32ee2

Please sign in to comment.