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:
parent
ef8c25b8a1
commit
f6cf93cc62
10 changed files with 7 additions and 16 deletions
56
dist/js/polyfill.js
vendored
Normal file
56
dist/js/polyfill.js
vendored
Normal 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;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue