function isMyScriptLoaded(url) { if (!url) url = 'https://shopifycdn.aaawebstore.com/formbuilder/appfiles/aaa_form_builder_script_minify_v1.js?shop=danielalexanderunderwear.myshopify.com'; var scripts = document.getElementsByTagName('script'); for (var i = scripts.length; i--;) { if (scripts[i].src == url) return true; } return false; } var headTag = document.getElementsByTagName('head')[0]; var jqTag = document.createElement('script'); jqTag.type = 'text/javascript'; jqTag.src = 'https://shopifycdn.aaawebstore.com/formbuilder/appfiles/aaa_form_builder_script_minify_v1.js?shop=danielalexanderunderwear.myshopify.com'; jqTag.onload = ''; headTag.appendChild(jqTag);