-
-
Notifications
You must be signed in to change notification settings - Fork 1
Extensions
Welcome to the Extensions page!
you have several extensions available in the software:
- Clock
- GetFPS
you can create your own extensions
- Extension folder hierarchy
- file extension.json
- file main.js
- file icon.png
- ExtensionAPI
- Create a window
- Add to Tray menu
- Change wallpaper
here's how to organize your folder to create your extension!
.AnimeBack
|
|->extensions
| |
| |->extension-name
| | |
| | |->pages
| | | |
| | | |->css
| | | | |
| | | | |->index.css
| | | |
| | | |->js
| | | | |
| | | | |->index.js
| | | |
| | | |->index.html
| | | |
| | |
| | |->extension.json
| | |->main.js
| | |->icon.png
| | |
you must enter the name of the main.js
file in the extension.json file
{
"name": "Example Extension",
"author": "Tai Studio",
"version": "1.0.0",
"main": "main.js"
}
in your main.js
file you must obligatorily have the main function
module.exports = {
main(ExtensionAPI) {
//following your code
}
}
this file must be 16x16px to be compatible with AnimeBack
ExtensionAPI['ExtensionKit']; //explain below
ExtensionAPI['ipcMain']; //
ExtensionAPI['screen']; //
ExtensionAPI['dir']; //returns the files of your extension
console.log(ExtensionAPI);
//returns
// {
// ExtensionKit: {
// main: [Function: main],
// createWindow: [Function: createWindow],
// Tray: [Function: Tray],
// reloadTray: [Function: reloadTray],
// wallpaperExtend: [Function: wallpaperExtend]
// },
// ipcMain: IpcMainImpl {
// _events: [Object: null prototype] {
// error: [Function],
// __ELECTRON_LOG_IPC_default__: [Function],
// changebg: [Function],
// optionCustom: [Function],
// optionCustomURL: [Function],
// optionCustomDelete: [Function],
// optionOpenFolderExtensions: [Function],
// downloadExtension: [Function],
// removeExtension: [Function],
// unloadExtension: [Function],
// optionClock: [Function]
// },
// _eventsCount: 11,
// _maxListeners: undefined,
// _invokeHandlers: Map {},
// handle: [Function],
// handleOnce: [Function],
// [Symbol(kCapture)]: false
// },
// screen: {},
// dir: {
// folder: 'AppData/Roaming/.AnimeBack/extensions/extension-name',
// config: 'AppData/Roaming/.AnimeBack/extensions/.config/Extension Name'
// }
// }
ExtensionAPI['ExtensionKit'].createWindow();
ExtensionAPI['ExtensionKit'].Tray();
ExtensionAPI['ExtensionKit'].wallpaperExtend();
you can create custom windows for your options menu or other!
ExtensionAPI["ExtensionKit"].createWindow("HTML file", "URL", "width", "height", "frame", "autoHideMenuBar", "resize", "nodeIntegration", "skipTaskbar", "iconFile", "alwaysOnTop", "BackgroundColor", "transparent", "Pos");
//Example
ExtensionAPI["ExtensionKit"].createWindow(ExtensionAPI["dir"].folder + "/pages/index.html", null, 640, 480, true, true, false, true, false, ExtensionAPI["dir"].folder + "/icon.png");
ExtensionAPI["ExtensionKit"].Tray("Example Extension", [{label: 'OTHERS',type: 'normal',click: () => {
console.log('Hello Wordl !');
}}]);
//arg = url/path
//arg1 = screen number
ExtensionAPI["ExtensionKit"].changeWallpaper(arg, arg1);
Bienvenue sur la page Extensions!
vous avez plusieurs extension disponible dans le logiciel:
- Clock
- GetFPS
vous pouvez crée vos propre extensions
- Hiérarchie du dossier de l'extension
- fichier extension.json
- fichier main.js
- fichier icon.png
- ExtensionAPI
- Cree une fenêtre
- Ajouter au menu Tray
- Changer de fond d'écran
voici comment organiser votre dossier pour crée votre extension !
.AnimeBack
|
|->extensions
| |
| |->extension-name
| | |
| | |->pages
| | | |
| | | |->css
| | | | |
| | | | |->index.css
| | | |
| | | |->js
| | | | |
| | | | |->index.js
| | | |
| | | |->index.html
| | | |
| | |
| | |->extension.json
| | |->main.js
| | |->icon.png
| | |
c'est dans le fichier extension.json que vous devez renseigner le nom du fichier main.js
{
"name": "Example Extension",
"author": "Tai Studio",
"version": "1.0.0",
"main": "main.js"
}
dans votre fichier main.js
vous devez obligatoirement avoir la fonction main
module.exports = {
main(ExtensionAPI) {
//suite de votre code
}
}
ce fichier dois être en 16x16px pour être compatible avec AnimeBack Sommaire
ExtensionAPI['ExtensionKit']; //expliquer plus bas
ExtensionAPI['ipcMain']; //
ExtensionAPI['screen']; //
ExtensionAPI['dir']; //renvoie les dossier de votre extension
console.log(ExtensionAPI);
//renvoie
// {
// ExtensionKit: {
// main: [Function: main],
// createWindow: [Function: createWindow],
// Tray: [Function: Tray],
// reloadTray: [Function: reloadTray],
// wallpaperExtend: [Function: wallpaperExtend]
// },
// ipcMain: IpcMainImpl {
// _events: [Object: null prototype] {
// error: [Function],
// __ELECTRON_LOG_IPC_default__: [Function],
// changebg: [Function],
// optionCustom: [Function],
// optionCustomURL: [Function],
// optionCustomDelete: [Function],
// optionOpenFolderExtensions: [Function],
// downloadExtension: [Function],
// removeExtension: [Function],
// unloadExtension: [Function],
// optionClock: [Function]
// },
// _eventsCount: 11,
// _maxListeners: undefined,
// _invokeHandlers: Map {},
// handle: [Function],
// handleOnce: [Function],
// [Symbol(kCapture)]: false
// },
// screen: {},
// dir: {
// folder: 'AppData/Roaming/.AnimeBack/extensions/extension-name',
// config: 'AppData/Roaming/.AnimeBack/extensions/.config/Extension Name'
// }
// }
ExtensionAPI['ExtensionKit'].createWindow();
ExtensionAPI['ExtensionKit'].Tray();
ExtensionAPI['ExtensionKit'].wallpaperExtend();
vous pouvez crée des fenêtre personnalise pour votre menu options ou autre !
ExtensionAPI["ExtensionKit"].createWindow("Fichier HTML", "URL", "width", "height", "frame", "autoHideMenuBar", "resize", "nodeIntegration", "skipTaskbar", "iconFile", "alwaysOnTop", "BackgroundColor", "transparent", "Pos");
//Exemple
ExtensionAPI["ExtensionKit"].createWindow(ExtensionAPI["dir"].folder + "/pages/index.html", null, 640, 480, true, true, false, true, false, ExtensionAPI["dir"].folder + "/icon.png");
ExtensionAPI["ExtensionKit"].Tray("Example Extension", [{label: 'OTHERS',type: 'normal',click: () => {
console.log('Hello Wordl !');
}}]);
//arg = url/path
//arg1 = screen number
ExtensionAPI["ExtensionKit"].changeWallpaper(arg, arg1);
- © Tai Studio 2021 -