forked from Wil-B/Library-Tree
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlibrary_tree.js
More file actions
75 lines (70 loc) · 2.61 KB
/
library_tree.js
File metadata and controls
75 lines (70 loc) · 2.61 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
66
67
68
69
70
71
72
73
74
75
'use strict';
//29/04/26
if (!window.ScriptInfo.PackageId) { window.DefineScript('Library-Tree-SMP', { author: 'regorxxx', version: '2.0.0-beta', features: { drag_n_drop: true, grab_focus: true } }); }
window.DrawMode = Math.max(Math.min(window.GetProperty('- Draw mode: GDI (0), D2D (1)', 0), 1), 0); // Regorxxx <- GDI/D2D draw mode ->
const loadAsync = window.GetProperty('Load Library Tree Asynchronously', true);
async function readFiles(files) {
for (const file of files) {
if (window.ID) { // fix pss issue
await include(file);
}
}
}
// Regorxxx <- change file structure
const files = [
// Regorxxx <- xxx-scripts helpers
'helpers\\helpers_xxx.js',
/* global globProfiler:readable, globSettings:readable */
'helpers\\helpers_xxx_flags.js',
'helpers\\helpers_xxx_input.js',
'helpers\\helpers_xxx_language.js',
'helpers\\helpers_xxx_prototypes_smp.js',
'helpers\\helpers_xxx_tags.js',
'helpers\\callbacks_xxx.js',
'helpers\\helpers_xxx_prototypes_smp_post.js',
'helpers\\helpers_xxx_UI_draw.js',
'main\\filter_and_query\\remove_duplicates.js',
'main\\sort\\scatter_by_tags.js',
'main\\sort\\harmonic_mixing.js',
'main\\window\\window_xxx_dynamic_colors.js',
// Regorxxx ->
'main\\library_tree\\helpers.js',
'main\\library_tree\\properties.js',
/* global ppt:readable */
'main\\library_tree\\interface.js',
'main\\library_tree\\images.js', // Regorxxx <- Code cleanup | External integration | Custom TF art ->
'main\\library_tree\\panel.js',
'main\\library_tree\\scrollbar.js',
'main\\library_tree\\library.js',
'main\\library_tree\\populate.js',
'main\\library_tree\\search.js',
'main\\library_tree\\buttons.js',
'main\\library_tree\\popupbox.js',
'main\\library_tree\\timers.js',
'main\\library_tree\\menu.js',
'main\\library_tree\\initialise.js',
'main\\library_tree\\callbacks.js'
];
// Regorxxx ->
if (loadAsync) {
readFiles(files).then(() => {
globProfiler.Print('helpers'); // Regorxxx <- Init profiler ->
if (!window.ID) return; // fix pss issue
on_size();
if (window.IsVisible) { window.Repaint(); }
// Update check
if (ppt.bAutoUpdateCheck) {
include('helpers\\helpers_xxx_web_update.js');
/* global checkUpdate:readable */
setTimeout(checkUpdate, 120000, { bDownload: globSettings.bAutoUpdateDownload, bOpenWeb: globSettings.bAutoUpdateOpenWeb });
}
});
} else {
files.forEach(v => include(v));
globProfiler.Print('helpers'); // Regorxxx <- Init profiler ->
// Update check
if (ppt.bAutoUpdateCheck) {
include('helpers\\helpers_xxx_web_update.js');
setTimeout(checkUpdate, 120000, { bDownload: globSettings.bAutoUpdateDownload, bOpenWeb: globSettings.bAutoUpdateOpenWeb });
}
}