Need help with code

Topic summary

A Shopify store owner is seeking help with a broken acne-safe ingredient checker tool that previously functioned correctly.

The Issue:

Code Details:

  • HTML/CSS/JavaScript tool that checks product ingredients against a list of comedogenic (acne-causing) ingredients
  • Users input ingredients separated by commas or line breaks
  • Results display unsafe ingredients in red and safe ones in green
  • Includes “Check Ingredients” and “Clear” buttons

Visible Problem:
The JavaScript code appears incomplete/corrupted—the comedogenicIngredients Set definition is cut off mid-array, and there’s a syntax error with an orphaned if (ingredient) statement, suggesting the code was improperly copied or truncated.

Status: The discussion remains open with no responses yet. The poster needs someone to review and fix the code for Shopify compatibility.

Summarized with AI on October 31. AI used: claude-sonnet-4-5-20250929.

Can someone check this code to make it work for shopify? It was working and now it is not. Shop Link - https://studioleclair.com/pages/acne-safe-checker

Acne Safe Ingredient Checker #ingredientList { width: 100%; max-width: 400px; height: 100px; } #result { font-size: 18px; margin-top: 10px; } .red-text { color: red; } .green-text { color: green; } #buttons { margin-top: 10px; } #credit { font-size: 12px; margin-top: 10px; color: #666; } #credit a { color: #666; text-decoration: none; }

Acne Safe Ingredient Checker

Enter a list of ingredients from your product (separated by commas or line breaks):


Check Ingredients Clear

Done by MaddieLizSites