1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-10 10:00:48 +09:00

move run.js to dist/js

This commit is contained in:
Andrew Simachev 2024-02-26 16:42:41 +01:00
parent ef8c25b8a1
commit f6cf93cc62
No known key found for this signature in database
GPG key ID: 49A163D0D14E6FD8
10 changed files with 7 additions and 16 deletions

56
dist/js/polyfill.js vendored Normal file
View file

@ -0,0 +1,56 @@
const RendererEvents = {};
window.AnytypeGlobalConfig = {
debug: {
mw: true,
},
};
window.Electron = {
platform: 'Windows',
version: {
},
isMaximized: () => {},
getGlobal: (v) => {
switch (v) {
case 'serverAddress':
return window.serverAddress;
};
},
removeAllListeners: function () {},
on: function (id, callBack) {
RendererEvents[id] = callBack;
console.log(RendererEvents);
},
send: function () {},
currentWindow: function () {
return { windowId: 1 };
},
Api: () => {},
};
window.require = window.require || function (mod) {
const ret = {};
switch (mod) {
case '@electron/remote':
ret.app = {
getVersion: function () { return ''; },
getPath: function () { return ''; },
};
ret.process = {
getSystemVersion: function () { return ''; },
};
break;
case 'os':
ret.platform = function () { return 'darwin'; };
ret.release = function () { return ''; };
break;
};
return ret;
};