1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-11 10:18:07 +09:00
anytype-ts/dist/polyfill.js
Andrew Simachev 684933d628 fix
2022-01-22 15:16:54 +03:00

48 lines
No EOL
1 KiB
JavaScript

let RendererEvents = {};
window.Config = {
debug: {
mw: true,
},
};
window.Renderer = {
send: function () {},
removeAllListeners: function () {},
on: function (id, callBack) {
RendererEvents[id] = callBack;
},
};
window.require = window.require || function (mod) {
let ret = {};
switch (mod) {
case '@electron/remote':
ret.app = {
getVersion: function () { return ''; },
getPath: function () { return ''; },
};
ret.process = {
getSystemVersion: function () { return ''; },
};
ret.getGlobal = function (v) {
switch (v) {
case 'serverAddr':
return 'http://127.0.0.1:61266';
break;
};
};
break;
case 'os':
ret.platform = function () { return 'darwin'; };
ret.release = function () { return ''; };
break;
};
return ret;
};