> For the complete documentation index, see [llms.txt](https://stachemsc.gitbook.io/stache-phone/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stachemsc.gitbook.io/stache-phone/making-adjustments/config-js.md).

# Config JS

Let's talk about what does what on the Config file.

{% hint style="warning" %}
It is not recommended to actively restart the script. After restarting, always log in again or restart the server. Since it is a highly loaded script, it may cause problems such as timeout.
{% endhint %}

<details>

<summary>DefaultLang</summary>

Type: <mark style="color:orange;">(string)</mark>

Details: <mark style="color:blue;">This variable displays the default selected language value.</mark>

</details>

<details>

<summary>UseCDN</summary>

Type: <mark style="color:orange;">(boolean)</mark>

Details: <mark style="color:blue;">You can determine whether to use a CDN service for images, gifs, and videos.</mark>

</details>

<details>

<summary>CDNProvider</summary>

Type: <mark style="color:orange;">(string)</mark>

Details: <mark style="color:blue;">If you are going to use your own CDN service, you can change this value.</mark>

</details>

<details>

<summary>DefaultSettings</summary>

Type: <mark style="color:orange;">(table)</mark>

Details: <mark style="color:blue;">This section allows you to set the default phone settings by default.</mark>

</details>

<details>

<summary>SiriSettings</summary>

Type: <mark style="color:orange;">(table)</mark>

Details: <mark style="color:blue;">This section allows you to configure your Siri settings. Detailed information is available in the file.</mark>

</details>

<details>

<summary>Advanced911System</summary>

Type: <mark style="color:orange;">(table)</mark>

Details: <mark style="color:blue;">This section allows you to configure your 911 settings. Detailed information is available in the file.</mark>

</details>

<details>

<summary>FullSizeImageViewerFit</summary>

Type: <mark style="color:orange;">(boolean)</mark>

Details: <mark style="color:blue;">The section where you can adjust whether the image viewer appears in full screen or in phone size.</mark>

</details>

<details>

<summary>MailEnableSuffix</summary>

Type: <mark style="color:orange;">(boolean)</mark>

Details: <mark style="color:blue;">Setting whether to use a suffix when creating an email address.</mark>

</details>

<details>

<summary>MailSuffix</summary>

Type: <mark style="color:orange;">(string)</mark>

Details: <mark style="color:blue;">If you are using a suffix, what should it be?</mark>

</details>

<details>

<summary>BluePages</summary>

Type: <mark style="color:orange;">(table)</mark>

Details: <mark style="color:blue;">This section allows you to configure the settings of the Bluepages application. Details are available in the file.</mark>

</details>

<details>

<summary>SystemMessages</summary>

Type: <mark style="color:orange;">(table)</mark>

Details: <mark style="color:blue;">This section is where you define system messages. If you do not want to respond to messages from specific numbers, use this section.</mark>

</details>

<details>

<summary>X_Settings</summary>

Type: <mark style="color:orange;">(table)</mark>

Details: <mark style="color:blue;">This section allows you to configure the settings of the Kiwitter application. Details are available in the file.</mark>

</details>

<details>

<summary>MainApps</summary>

Type: <mark style="color:orange;">(table)</mark>

Details: <mark style="color:blue;">This section is where you can add or remove applications. Details are available in the file.</mark>

</details>

<details>

<summary>DefaultApps</summary>

Type: <mark style="color:orange;">(table)</mark>

Details: <mark style="color:blue;">This section allows you to specify the applications that come pre-installed by default on the phone.</mark>

</details>

### Adding a custom application.

Define the new application inside the MainApps array, for example.

```javascript
       {
          id: 10, // (required)
          order: 10, // (required)
          AppName: "Test App", // (required)
          open: "nui://examplecustomapp/index.html", // App Open Name (appname or iframe name) (not required)
          MenuBtnColor: "white", // Menu Button Color (white/black). Default: "white" (It is recommended not to make changes.)
          Descp: "Sounds Good.", // Appstore Description (required)
          Size: 566231040, // App Size (Bytes) (required)
          IsVertical: true, // Is Vertical (true/false) (required)
          Type: "AppsPage", // Appstore Page Type (GamesPage, AppsPage, ArcadePage) (required)
          Version: "1.0.0", // App Version (String). Default: "1.0.0" if use "0" Disable Download App. (required)
          AppIcon: "https://appicon.com/appicon.png",  // (required)
          StoreInfo: { // Appstore Info (required)
            Price: null, // App Price (Int). Default: null if use null Disable Purchase.
            Catagory: "Test Applications", // App Catagory (String)
            Age: 12, // App Age (Int)
            RatingData: { // App Rating Data
              Rating: 3.7, // App Rating (Float) (Max: 5.0)
              RatingCount: 1.2 // App Rating Count (Float)
            },
            ChartInfo: { // App Chart Info 
              Num: 12 // App Chart Number (Int)
            },
            Screenshots: [ // App Screenshots (Array)
              "https://appscreenshots.com/appscreenshot1.png",
              "https://appscreenshots.com/appscreenshot2.png",
              // ...
            ]
          }
        },
```

You can add it by making edits on the draft.

{% hint style="warning" %}
Pay attention to the 'id' and 'order' sections. Make sure they are not the same as another application.
{% endhint %}

{% hint style="info" %}
If you want to add a default pre-installed application, use the following draft.
{% endhint %}

```javascript
        {
          id: 1, // App ID (required)
          order: 1, // App Order Number (required)
          AppName: "Test App",  // App Name (required)
          AppIcon: "https://appicon.com/appicon.png", // App Icon (required)
          Whitelist: true, // Whitelisted App (Can't be deleted) (not required)
          open: "nui://examplecustomapp/index.html", // App Open Name (appname or iframe name) (not required)
          MenuBtnColor: "white" // Menu Button Color (white/black). Default: "white" (It is recommended not to make changes.)
        },
```

{% hint style="info" %}
If you don't fill in the 'open' variable, the application will be downloaded but not opened.
{% endhint %}

{% hint style="info" %}
If you set the 'version' variable to 0, the application will not be downloaded.
{% endhint %}
