Skip to content

Commit a0656c7

Browse files
committed
[FIX] (potentialy) the broken links to the game and game creator
1 parent 1abbe96 commit a0656c7

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed
72 Bytes
Binary file not shown.

html/assets/js/user/inject_test_widget_emotions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function getTestWidgetEmotions() {
2727

2828
function getIframeOfTheGame() {
2929
// URL for the iframe (can be dynamically set as needed)
30-
var iframeUrl = `${window.location.origin}/games`;
30+
var iframeUrl = `${window.location.origin}${checkHtmlPath()}/games`;
3131
const button = document.createElement("button");
3232
button.onclick = function () {
3333
window.open(iframeUrl, '_blank', 'width=600,height=400');

html/routes/user/dashboard/index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,17 @@
172172
/* Prevents scrolling */
173173
}
174174
</style><script type="text/JavaScript">
175-
const url = `${window.location.origin}/games`;
175+
function load_info() {
176+
const url = `${window.location.origin}${checkHtmlPath()}/games`;
176177
const iframe = document.createElement('iframe');
177178
iframe.src = url;
178179
iframe.id = 'iframe-quizz-node';
179180
const iframeQuizzNode = document.getElementById('iframe-quizz-node-div');
180181
iframeQuizzNode.appendChild(iframe);
182+
}
183+
document.addEventListener('DOMContentLoaded', load_info);
181184
</script>
185+
182186
</section>
183187
<section></section>
184188
</aside>

0 commit comments

Comments
 (0)