rubick/public/feature/preload.js
2023-09-01 17:56:16 +08:00

17 lines
454 B
JavaScript

const remote = require('@electron/remote');
window.market = {
getLocalPlugins() {
return remote.getGlobal('LOCAL_PLUGINS').getLocalPlugins();
},
downloadPlugin(plugin) {
return remote.getGlobal('LOCAL_PLUGINS').downloadPlugin(plugin);
},
deletePlugin(plugin) {
return remote.getGlobal('LOCAL_PLUGINS').deletePlugin(plugin);
},
refreshPlugin(plugin) {
return remote.getGlobal('LOCAL_PLUGINS').refreshPlugin(plugin);
},
};