lbry-desktop/lbrytv/stubs/electron.js

42 lines
804 B
JavaScript
Raw Normal View History

2019-03-05 05:46:57 +01:00
const callable = () => {
throw new Error('Need to fix this stub');
2019-03-05 05:46:57 +01:00
};
export const remote = {
dialog: {
showOpenDialog: callable,
},
getCurrentWindow: callable,
app: {
getAppPath: callable,
2019-07-29 16:34:20 +02:00
getLocale: () => 'en',
2019-03-05 05:46:57 +01:00
},
BrowserWindow: {
getFocusedWindow: callable,
},
Menu: {
getApplicationMenu: callable,
2019-10-29 08:00:02 +01:00
buildFromTemplate: () => {
return {
popup: () => {},
};
},
2019-03-05 05:46:57 +01:00
},
require: callable,
};
2019-10-29 08:00:02 +01:00
export const clipboard = {
readText: () => '',
2019-11-02 16:03:21 +01:00
writeText: text => {
var dummy = document.createElement('textarea');
document.body.appendChild(dummy);
dummy.value = text;
dummy.select();
document.execCommand('copy');
document.body.removeChild(dummy);
},
2019-10-29 08:00:02 +01:00
};
2019-08-21 22:54:44 +02:00
export const ipcRenderer = {};
2019-03-05 05:46:57 +01:00
export const isDev = false;