nt.body.appendChild(restockRocketScriptElement);
}
createRestockRocketContainer()
console.debug('STOQ - extension activated')
function applyTranslations(settings) {
try {
// Skip translation logic entirely if multi-language is not enabled
if (!settings || !settings.multi_language_enabled) {
return settings;
}
if (!settings.translations) {
console.debug('STOQ - No translations found, skipping translation');
return settings;
}
const normalizedLocale = window._RestockRocketConfig.normalizedLocale;
const translations = settings.translations;
if (!normalizedLocale) {
// No matching locale has translations; drop payload to save memory
console.debug('STOQ - No matching locale for translations. Available:', Object.keys(translations || {}));
delete settings.translations;
return settings;
}
console.debug(`STOQ - Applying translations for normalized locale: ${normalizedLocale} (original:
Create account
SearchOpen navigation menu
Open search bar
PedalsOpen navigation menu
Second-Hand Bikes
See MoreWorkshop
Open search bar
Custom Builds for saleOther
E-bike Batteries and chargers
Custom BuildsTrack Your Service
Wheels
Complete Wheels
Custom Builds
Custom Build Inspiration
Cycle To Work Schemes
Book a ServiceBike PackingEnve
Track Your ServiceBags and Transportation
Cleaners, Degreasers and Lubrication
Tools & Maintenance
Parts & Components
TubelessSee More
maxRetries) {
console.debug(`STOQ - API not ready, retry ${attempt}/${maxRetries}`);
setTimeout(() => attemptCartCheck(attempt + 1), retryDelay);
} else {
console.debug('STOQ - API not loaded after max retries, skipping cart selling plan check');
}
}
attemptCartCheck();
}