Files
sentence1/New-project/tdv_sdk.js
lubukhu 97b99c602a
All checks were successful
Deploy to Production / deploy (push) Successful in 10s
up
2026-01-27 16:33:25 +07:00

26 lines
671 B
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(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);
})();