Repository navigation
Expand file tree
/
Copy pathinterface+.js
More file actions
65 lines (58 loc) · 2.86 KB
/
Copy pathinterface+.js
File metadata and controls
65 lines (58 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
(function () {
'use strict';
// Додаємо переклад для назви плагіна
Lampa.Lang.add({
custom_interface_plugin: {
ru: 'Кастомізація інтерфейсу',
en: 'Customization interface',
uk: 'Кастомізація інтерфейсу'
}
});
// Список модулів для підключення
var modules = [
'https://mastermagic98.github.io/interface/attention.js',
'https://mastermagic98.github.io/interface/cardify.js',
'https://mastermagic98.github.io/interface/color.js',
'https://mastermagic98.github.io/interface/aloader.js',
'https://mastermagic98.github.io/interface/loaders.js',
'https://mastermagic98.github.io/interface/animations.js',
// 'https://mastermagic98.github.io/interface/incardtemplate.js',
'https://mastermagic98.github.io/interface/fix_lang.js',
'https://mastermagic98.github.io/interface/buttons.js',
// 'https://mastermagic98.github.io/interface/studios.js',
'https://mastermagic98.github.io/interface/key_off.js'
];
// Асинхронне підключення модулів
modules.forEach(function (url) {
Lampa.Utils.putScriptAsync([url], function () {}, function () {});
});
// Функція ініціалізації плагіна
function startPlugin() {
// Додаємо новий розділ у Налаштуваннях
Lampa.SettingsApi.addComponent({
component: 'interface_customization',
icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 14 14" fill="none"><g fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round"><path d="M13 2H1a.5.5 0 0 0-.5.5v8a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5v-8A.5.5 0 0 0 13 2m-7 9l-1 2.5M8 11l1 2.5m-5 0h6M7.5 2v9M3 5h2M3 8h1"/><path d="m7.5 7l1.21-1a2 2 0 0 1 2.55 0l2.24 2"/></g></svg>',
name: Lampa.Lang.translate('custom_interface_plugin')
});
// Оновлюємо відображення налаштувань
if (Lampa.Settings && Lampa.Settings.main) {
Lampa.Settings.main().render();
}
}
// Запускаємо плагін після готовності програми
if (window.appready) {
startPlugin();
} else {
Lampa.Listener.follow('app', function (event) {
if (event.type === 'ready') {
startPlugin();
}
});
}
// Опис маніфесту плагіна
Lampa.Manifest.plugins = {
name: 'custom_interface_plugin',
version: '1.0.0',
description: 'Customization interface'
};
})();