add local plinko files

This commit is contained in:
zyqunix 2025-03-18 16:53:49 +01:00
parent 64b7ca36f4
commit 38d6c901ff
8 changed files with 36932 additions and 35 deletions

View file

@ -0,0 +1,74 @@
/******/ (() => { // webpackBootstrap
/*!**********************!*\
!*** ./src/index.js ***!
\**********************/
// eslint-disable-next-line no-undef
var basePath = "https://boost.bgaming-network.com/";
console.log(basePath);
// Feature flag configuration
var featureFlags = {
amplitude: false,
actioncable: false,
sentry: true
};
var boostModules = {
amplitude: {
src: '/static/analytics/amplitude.js'
},
actioncable: {
src: '/static/websockets.js'
},
sentry: {
src: 'sentry.js'
}
};
// Function to dynamically load scripts based on feature flags with an onComplete callback
function loadFeatureScripts(flags, onComplete) {
console.log('load feature scripts', flags);
var featuresToLoad = Object.keys(flags).filter(function (feature) {
return flags[feature];
});
var loadedCount = 0;
// If there are no scripts to load, call onComplete immediately
if (featuresToLoad.length === 0) {
onComplete && onComplete();
return;
}
// Load each feature script by ID
featuresToLoad.forEach(function (featureID) {
loadScript(featureID, function () {
loadedCount++;
// Call onComplete when all scripts are loaded
if (loadedCount === featuresToLoad.length && typeof onComplete === 'function') {
onComplete();
}
});
});
}
// Function to load an individual script by ID with a callback
function loadScript(moduleID, callback) {
console.log('load script', moduleID, boostModules[moduleID].src);
var script = document.createElement('script');
script.src = "".concat(basePath).concat(boostModules[moduleID].src);
script.onload = function () {
console.log("Loaded script with ID: ".concat(moduleID));
callback && callback();
};
script.onerror = function () {
console.error("Failed to load script with ID: ".concat(moduleID));
callback && callback();
};
document.head.appendChild(script);
}
// Example usage: Load scripts based on feature flags, and log a message when complete
loadFeatureScripts(featureFlags, function () {
console.log('All feature scripts loaded successfully.');
});
/******/ })()
;
//# sourceMappingURL=wrapper.js.map