within 5 kmAbility to work in a dynamic and fast paced environment.
within 10 km
$("footer.footer-container").load(jsResPrefix.value + "GetFooter .footer", function () {
//customizations
$(this).find(".footer__links-section__newsletter").remove();
$(this).find("a").each(function () {
var title = $(this).attr("title");
var lang = $("html").attr("lang");
if (title) {
var giftCardUrl = (lang === "en") ? "https://www.dollarama.com/en-ca/gift-cards/" : "https://www.dollarama.com/fr-ca/cartes-cadeaux/";
if (title.indexOf("Gift Cards") !== -1 || title.indexOf("Cartes-cadeaux") !== -1) {
$(this).removeAttr("onclick");
$(this).attr("href", giftCardUrl);
}
var shippingFeesUrl = (lang === "en") ? "https://www.dollarama.com/en-ca/faq/website/shipping/" : "https://www.dollarama.com/fr-ca/faq/site-web/livraison/";
if (title.indexOf("ShippingPopup") !== -1) {
$(this).removeAttr("onclick");
$(this).attr("href", shippingFeesUrl);
}
}
});
loadScriptOnce('https://www.dollarama.com/dist/assets/footer-D7L8Kgmo.js', 'external-footer-script');
});
$("footer.footer-bottom-container").load(jsResPrefix.value + "GetFooter #footer-bottom-nav, #flatfee-lookup-modal, #giftcard-modal", function () {
var scripts = document.getElementById('scripts');
});
/* Loads a script once, with optional id guard */
function loadScriptOnce(src, id) {
return new Promise((resolve, reject) => {
if (id && document.getElementById(id)) {
return resolve('already-loaded');
}
const s = document.createElement('script');
s.src = src;
if (id) s.id = id;
s.async = true;
s.onload = () => resolve('loaded');
s.onerror = (e) => reject(new Error(`Failed to load ${src}`));
document.head.appendChild(s);
});
}