# Edit Theme JavaScript

{% hint style="warning" %}
**We do not support code customizations**. This guide offers a basic reference for developers. Always test code changes on unpublished theme copies. For assistance, we recommend reaching out to a [verified Fluorescent partner](https://partners.fluorescent.co/).
{% endhint %}

{% hint style="info" %}
If you want to modify only a few components and retain code splitting, consider using Cornerstone's standalone file for [custom JavaScript events](https://help.fluorescent.co/cornerstone/for-developers/custom-javascript-events).
{% endhint %}

Cornerstone includes a single, editable JavaScript file (**`assets/theme.js`**) for custom development that can be enabled in the **`snippets/theme-globals.liquid`** file.

Switching to the unminified **`theme.js`** disables code splitting, which bundles the theme JavaScript into multiple files used for lazy-loading and improved site performance. We do not recommend editing these files directly.

### Switch to theme.js

***

The **`theme.js`** file, when enabled, lets you edit a single JavaScript file, instead of many files, and includes comments from our developers to help you along.

<details>

<summary><mark style="color:blue;"><strong>STEPS</strong></mark></summary>

Open the **`theme-globals.liquid`** file in the **Snippets** folder.

1. Find the **`useUnminThemeJS`** variable and set it to **`true`**

{% code overflow="wrap" %}

```
```

{% endcode %}

\`\`\`json

````
{% assign useUnminThemeJS = false %}


```
````

2\. You can now begin editing the \*\*\`theme.js\`\*\* file in the \*\*Assets\*\* folder.

```
> We highly recommend backing up your theme and documenting any additions for troubleshooting and theme updates, which require manually transferring the code.
```

</details>

> **How's Cornerstone working for you?**
>
> We built Cornerstone with developers in mind. We're looking to create relationships with third-party developers using our themes and want to hear from you about what you're building. Please feel free to reach out with questions or introduce yourself by e-mailing us at <developers@fluorescent.co>

<br>

***

> **Related links**
>
> [Custom JavaScript events](https://help.fluorescent.co/cornerstone/for-developers/custom-javascript-events)\
> [Custom Liquid](https://help.fluorescent.co/cornerstone/for-developers/custom-liquid)\
> [Custom CSS](https://help.fluorescent.co/cornerstone/for-developers/custom-css)\
> [Custom fonts](https://help.fluorescent.co/cornerstone/for-developers/custom-fonts)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.fluorescent.co/cornerstone/for-developers/edit-theme-javascript.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
