-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.js
35 lines (30 loc) · 1017 Bytes
/
main.js
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
'use strict';
include('scripts\\LastList.js');
include('scripts\\button.js');
include('scripts\\LastListMenu.js');
// check if cache folder exists and create it if not
try {
let cachePath = fb.ProfilePath + "LastListCache\\";
if (!utils.IsDirectory(cachePath)) {
let fso = new ActiveXObject('Scripting.FileSystemObject');
fso.CreateFolder(cachePath);
}
} catch (e) {
console.log(e.message);
}
// show notice to user
let messageTimeStamp = 1677757460;
if (!utils.CheckComponent('foo_youtube', true) && window.GetProperty('show_popup', false) != messageTimeStamp) {
fb.ShowPopupMessage(`
Want to play tracks missing in your library?
Install foo_youtube component:
https://www.foobar2000.org/components/view/foo_youtube
`, 'Last List');
window.SetProperty('show_popup', messageTimeStamp);
}
// Button
const buttons = {
LastListButton: new columnButton(buttonTemplate, 0, "Last List", function () {
LastListMenu.getMenu().btn_up(this.x, this.y + this.h)
}),
};