udpate
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Loads payout-24h.section.html into #payout-24h-container.
|
||||
*/
|
||||
(function () {
|
||||
var MODULE_URL = '/pages/modules/payout-24h.section.html';
|
||||
|
||||
function loadPayout24hModule() {
|
||||
var container = document.getElementById('payout-24h-container');
|
||||
if (!container) return;
|
||||
|
||||
fetch(MODULE_URL, { credentials: 'same-origin' })
|
||||
.then(function (res) {
|
||||
if (!res.ok) throw new Error('Failed to load ' + MODULE_URL);
|
||||
return res.text();
|
||||
})
|
||||
.then(function (html) {
|
||||
container.innerHTML = html;
|
||||
document.dispatchEvent(new CustomEvent('aifo:payout-24h-ready'));
|
||||
})
|
||||
.catch(function (err) {
|
||||
console.error('[payout-24h-module.js]', err);
|
||||
});
|
||||
}
|
||||
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', loadPayout24hModule);
|
||||
} else {
|
||||
loadPayout24hModule();
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user