Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyEye-FAST committed Jul 23, 2024
1 parent b819940 commit ab3b96d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion static/js/quiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ $(document).ready(() => {

$(document).ready(() => {
const titleToShare = title || "Minecraft Standard Translation Quiz";
const textToShare = text || "Test your mastery of standard translations...";
const currentUrl = new URL(window.location.href);
const lastSegment = currentUrl.pathname
.split("/")
Expand Down Expand Up @@ -326,7 +327,7 @@ $(document).ready(() => {
navigator
.share({
title: titleToShare,
text: lastSegment,
text: textToShare,
url: window.location.href,
})
.then(() => console.log("Shared successfully!"))
Expand Down
3 changes: 2 additions & 1 deletion templates/quiz_sub.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
<script>
const questions = {{ questions | tojson | safe }};
const randomCode = "{{ random_code }}";
const title = "{{ _("Minecraft Standard Translation Quiz") }}"
const title = "{{ _('Minecraft Standard Translation Quiz') }}";
const text = "{{ _('Test your mastery of standard translations...') }}";
</script>
<script src="{{ url_for('static', filename='js/dark-mode.js') }}"></script>
<script src="{{ url_for('static', filename='js/quiz.js') }}"></script>
Expand Down

0 comments on commit ab3b96d

Please sign in to comment.