-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.js
36 lines (31 loc) · 976 Bytes
/
build.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
36
import initFM from './src';
import ImagePreview from "./src/plugins/ImagePreview";
// const doc = window.parent.document;
const doc = window.document;
const div = doc.createElement('div');
doc.body.appendChild(div);
window.openFileManager = initFM('/react-filemanager-server/', div);
// window.openFileManager = initFM('/react-filemanager-server/', document.querySelector('.app'));
[
"dist/style.css",
"//try.getquix.net/libraries/quix/assets/css/qxui.css",
"//try.getquix.net/libraries/quix/assets/css/qxbs.css",
].forEach(href=>{
const link = doc.createElement("link");
link.rel = "stylesheet";
link.href = href;
doc.head.insertBefore(link, doc.head.firstChild);
});
window.ReactFileManager.registerPlugin(ImagePreview);
window.ReactFileManager.registerPlugin({
details: {
context_menu: {
scopes: ['all'],
label: 'Details',
category: 'details',
callback(store, item) {
console.log(store, item);
}
}
}
});