Solved

remove script from customization

sourav-dev
Shopify Partner
2 1 1

hello I want to add script from my custom app to the view page of my website but it also show me in customization section i don't want it please help me https://prnt.sc/nT4WFyz012HS i don't want alert box here : https://prnt.sc/sDiyfLDrI8ou i only want it in website view section onlyScreenshot_2.png

Accepted Solution (1)

sourav-dev
Shopify Partner
2 1 1

This is an accepted solution.

{% if request.design_mode %}
  {% else  %}
    <script>
        alert ("home page");
    </script>
{% endif %}
I found the solution after some research you just need to ad this conditional statement to remove scripts from customization of designing part 

View solution in original post

Reply 1 (1)

sourav-dev
Shopify Partner
2 1 1

This is an accepted solution.

{% if request.design_mode %}
  {% else  %}
    <script>
        alert ("home page");
    </script>
{% endif %}
I found the solution after some research you just need to ad this conditional statement to remove scripts from customization of designing part