Yurba Docs
Yurba Documentation

Get started

Accounts

Apps

Users

Relationships

Dialogs (Messages)

Tracks (MuseBase)

Photos

Posts

Comments

Safety

Other

Yurba CDN (cdn.yurba.one)

Yurba Desktop API

Yurba Component Language

GET STARTED

How to create and start your extension

Good start! If you already have an idea for your extension, we will help you integrate it into Yurba Desktop. We recommend that you keep a close eye on updates, as if the API is updated, the API architecture for extensions will also change. To get your first extension working, you need to find the local_addons folder inside the application and create a folder there with your extension — it will contain the file itself and all the necessary assets for it. Example tree:

local_addons/ └── example/ └── index.js
Once you have created a space for your extension, you need to go to the app itself, specifically to the settings and the “Development” section, and click “Enable Developer Mode.” . This will restart your application and take you to developer mode, where you will have access to debugging tools such as Chrome Developer Tools for WebView and the application itself (you can enable this at the top by clicking on “View”). After that, or before that, you must enter the name of your local extension in the “Extensions” field (in our case: example) and restart the application.
Now your extension is ready to go, but before you scroll down to see what you can do, it's important to remember a couple of important things:

1. Inside the code, you must use the app variable as a provider between your code and the application: all methods and functions that make your extension work only work in this variable.

2. Methods that require a function callback, such as events, do not define the external context, as they are executed separately from your code, but you can use ready-made variables such as $this, which will contain the context that is important for your function. Example:

someButton.on("click", () => { console.log($this) // this variable will contain someButton console.log(app) // Also, in each function, the app is embedded })