# Quark Extensions

## Chrome Extensions

To use a Chrome extension, find its ID from the Chrome Web Store and input it into Quark. For example, the ID of Adblock Plus is `cfhdojbkjhnklbpkdaibdccddilifddb,` which can be found in the URL.

```
https://chromewebstore.google.com/detail/adblock-plus-free-ad-bloc/cfhdojbkjhnklbpkdaibdccddilifddb?utm_source=g1
```

#### Installing the Extension

After you've located the extension ID, follow these steps to install the extension in Quark:

1. Open Quark and navigate to the extensions menu. It is located in  Context Menu (Right Click) -> Settings -> Customize -> Chrome Extensions -> Add
2. Click on 'Add.' To add an unpacked extension go to Settings -> Developer -> Show app data, navigate to `/chrome-extensions` and drag the unpacked extension into the folder.
3. Enter the extension ID in the provided field and confirm.
4. The extension should now be installed and visible in your Quark extensions list after it automatically relaunches the app.

#### Managing Installed Extensions

To manage your installed extensions in Quark:

* Go to the extensions section in Settings where you will see a list of all installed extensions.
* Here, you can delete or view any installed extension.
* To remove an extension, click on the 'Delete' button next to the extension you wish to delete and it will be moved to Trash.

Remember to periodically check for updates to your extensions to ensure you have the latest features and security updates.

#### Troubleshooting

If you encounter issues while trying to install or use an extension in Quark:

* Ensure that you have entered the correct ID.
* Check if the extension is compatible with the version of Chromium used by Quark.
* Restart Quark and try installing the extension again.

## Main Process Extensions

#### Main Process Extensions in Quark

The main process extensions are specialized extensions that modify the core functionality of Quark, offering more advanced features and customization options. Installing these extensions requires a bit more technical know-how but can significantly enhance your Quark experience.

**Identifying Main Process Extensions**

Main process extensions are not typically found on the Chrome Web Store. Instead, they are often distributed through developer forums, GitHub repositories, or specialized software repositories. Always ensure that you trust the source of a main process extension before downloading and installing it to avoid security risks.

**Installing Main Process Extensions**

To install a main process extension in Quark:

1. Download the extension file to your computer.
2. Open Quark and navigate to Settings -> Customize -> Main Process Extensions.
3. Click on "Add." and select the file containing the extension source.
4. Once the installation is complete, Quark will automatically restart and the changes will take effect.

**Managing Main Process Extensions**

Managing main process extensions is similar to managing regular Chrome extensions in Quark:

* Go to the extensions section in Settings where you will see a list of all installed extensions.
* Here, you can delete or view any installed extension.
* To remove an extension, click on the 'Delete' button next to the extension you wish to delete and it will be moved to Trash.

**Troubleshooting Main Process Extensions**

Main process extensions can sometimes cause issues due to their deep integration with Quark's core functionalities. If you encounter problems:

* Confirm that the extension is compatible with your current version of Quark.
* Try reinstalling the extension to resolve any installation errors.
* Consult the extension's documentation or support channels for problem-specific troubleshooting steps.
* As a last resort, remove the extension and report the issue to the extension's developer for further assistance.

By following these guidelines, you can safely explore the world of main process extensions and take your Quark experience to new heights.

### Create a Main Process Extension

To create a main process create a file with the following:

{% code lineNumbers="true" %}

```javascript
module.exports = (_app, window, tray, menubarjs_app) => {
// where "_app" is the electron property from require('electron').app
// and window is the electron window
// tray is the electron tray instance
// and menubarjs_app is the app returned by menubar.js (https://www.npmjs.com/package/menubar.js)
}
```

{% endcode %}

This simple example demonstrates a template for creating a basic main process extension in Quark. Remember, when creating your extension, the goal is to enhance Quark's functionality without compromising its stability or security. Follow best practices for coding and ensure your extension does not introduce any vulnerabilities.

#### Sharing Your Main Process Extension

After developing your main process extension, you might want to share it with other Quark users. Here’s how to do it responsibly:

* **Documentation**: Write comprehensive documentation that covers installation, usage, and troubleshooting steps for your extension.
* **Source Code**: If possible, make the source code of your extension available on platforms like GitHub. This will allow others to review your code for security and functionality.


---

# 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://qe.coolstone.dev/quark-extensions.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.
