(function () { function whenJQuery(fn) { if (window.matchMedia && window.matchMedia("(max-width: 991px)").matches) return; if (window.jQuery && window.jQuery.fn) { fn(window.jQuery); return; } var attempts = 0; var timer = setInterval(function () { if (window.jQuery && window.jQuery.fn) { clearInterval(timer); fn(window.jQuery); } else if (++attempts >= 120) { clearInterval(timer); } }, 50); } function boot($) { if (typeof window.initializeCopyAccountNumber !== "function") return; $(function () { initializeCopyAccountNumber({ translations: { copied: "คัด ลอก", }, }); }); } whenJQuery(boot); })();