Window

In this article, we will explain the basic concepts of window plugins.

The vast majority of plugins should be developed using this method. It provides a browser window where you can develop the desired features, and this window will automatically pop up when the user clicks on the plugin.

We can set the window properties by setting the main field in the manifest.json file.

{
    "main": {}
}

Set the default open link URL for the window:

{
    "main": {
        "url": "index.html"
    }
}

Set the default width and height of the window:

{
    "main": {
        "url": "index.html",
        "width": 640,
        "height": 480
    }
}

After setting other metadata.json fields, the final code is as follows:

{
    "id": "LBCZE8V6LPCKD",
    "version": "1.0.0",
    "name": "Window Plugin",
    "logo": "/logo.png",
    "keywords": [],
    "main":
    {
        "url": "index.html",
        "width": 640,
        "height": 480
    }
}

🌐 Explore the Multilingual Support Project!

For developers needing to implement internationalization (i18n), this GitHub project offers an excellent demonstration. Click the link below to learn how to combine i18n with theme design to enhance the multilingual support of your application.

👉 Explore More

Note: You can refer to this article to learn about all the configuration methods for manifest.json

Last updated