up
All checks were successful
Deploy to Production / deploy (push) Successful in 10s

This commit is contained in:
lubukhu
2026-01-27 16:33:25 +07:00
parent dd87d118ad
commit 97b99c602a
28 changed files with 5617 additions and 37 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 B

View File

Before

Width:  |  Height:  |  Size: 155 B

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

View File

@@ -64,7 +64,7 @@
<!-- The canvas the project will render to. If you change its ID, don't forget to change the <!-- The canvas the project will render to. If you change its ID, don't forget to change the
ID the runtime looks for in the jQuery events above (ready() and cr_sizeCanvas()). --> ID the runtime looks for in the jQuery events above (ready() and cr_sizeCanvas()). -->
<canvas id="c2canvas" width="854" height="480"> <canvas id="c2canvas" width="1200" height="1200">
<!-- This text is displayed if the visitor's browser does not support HTML5. <!-- This text is displayed if the visitor's browser does not support HTML5.
You can change it, but it is a good idea to link to a description of a browser You can change it, but it is a good idea to link to a description of a browser
and provide some links to download some popular HTML5-compatible browsers. --> and provide some links to download some popular HTML5-compatible browsers. -->

BIN
New-project/media/click.ogg Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,18 +1,40 @@
{ {
"version": 1769247218, "version": 1769506337,
"fileList": [ "fileList": [
"data.js", "data.js",
"c2runtime.js", "c2runtime.js",
"jquery-3.4.1.min.js", "jquery-3.4.1.min.js",
"offlineClient.js", "offlineClient.js",
"images/correct-sheet0.png", "images/btn_check-sheet0.png",
"images/wrong-sheet0.png", "images/wrong-sheet0.png",
"images/pause-sheet0.png",
"images/slot-sheet0.png",
"images/txt_texttimer.png",
"images/txt_worditem.png",
"images/5sosarahtakesoff-sheet0.png",
"images/senaaikhoi-sheet0.png",
"images/checker_wrong_correct-sheet0.png",
"images/checker_wrong_correct-sheet1.png",
"images/btn_setting-sheet0.png",
"images/panel-sheet0.png",
"images/txt_question.png",
"images/btn_pause-sheet0.png",
"images/btn_music-sheet0.png",
"images/btn_music-sheet1.png",
"images/panel_pause-sheet0.png",
"images/layer-sheet0.png",
"images/newwordpng-sheet0.png",
"media/click.ogg",
"media/correct.ogg",
"media/error-010-206498.ogg",
"media/immersivecontrol-button-click-sound-463065.ogg",
"icon-16.png", "icon-16.png",
"icon-32.png", "icon-32.png",
"icon-114.png", "icon-114.png",
"icon-128.png", "icon-128.png",
"icon-256.png", "icon-256.png",
"loading-logo.png", "loading-logo.png",
"tdv_sdk.js",
"sena_sdk.js" "sena_sdk.js"
] ]
} }

View File

@@ -3,11 +3,11 @@
* @param {Object} config - Configuration object for the SDK * @param {Object} config - Configuration object for the SDK
* @param {Object} config.data - Quiz data containing question, options, and answer * @param {Object} config.data - Quiz data containing question, options, and answer
*/ */
function SenaSDK(gid = 'G2510S1T30') { function SenaSDK(gid) {
// Initialize data // Initialize data
this.data = null; this.data = null;
this.correctAnswer = null; this.correctAnswer = null;
this.gameCode = gid; this.gameCode = gid || window.SENA_GAME_CODE || 'G2510S1T30';
// Initialize properties // Initialize properties
this.timeLimit = 0; this.timeLimit = 0;
this.shuffle = true; this.shuffle = true;
@@ -35,14 +35,10 @@ SenaSDK.prototype.shuffleArray = function(array) {
[array[i], array[j]] = [array[j], array[i]]; [array[i], array[j]] = [array[j], array[i]];
} }
}; };
SenaSDK.prototype.load = function(callback,template = 'G2510S1T30') { SenaSDK.prototype.load = function(callback,template) {
let self = this; let self = this;
// get parameter LID from URL
const urlParams = new URLSearchParams(window.location.search); self.gameCode = self.gameCode || window.SENA_GAME_CODE || template;
const LID = urlParams.get('LID');
if (LID) {
self.gameCode = LID;
};
fetch(`https://senaai.tech/sample/${self.gameCode}.json`) fetch(`https://senaai.tech/sample/${self.gameCode}.json`)
.then(response => response.json()) .then(response => response.json())
.then(data => { .then(data => {

25
New-project/tdv_sdk.js Normal file
View File

@@ -0,0 +1,25 @@
(function () {
// Default game code
var DEFAULT_GAME_CODE = 'G2510S1T30';
var gameCode = DEFAULT_GAME_CODE;
// 1⃣ Trường hợp: ?gid=G2510S1T30
var params = new URLSearchParams(window.location.search);
if (params.has('gid')) {
gameCode = params.get('gid');
}
// 2⃣ Trường hợp: ?G2510S1T30 (không key)
else if (window.location.search.length > 1) {
var raw = window.location.search.substring(1);
if (/^G\d+/.test(raw)) {
gameCode = raw;
}
}
// Expose globally
window.SENA_GAME_CODE = gameCode;
console.log('[SENA] Game code detected:', gameCode);
})();