mirror of
https://github.com/VickScarlet/lifeRestart.git
synced 2025-07-17 09:33:55 +08:00
add github and discord
This commit is contained in:
15
src/index.js
15
src/index.js
@@ -1,6 +1,19 @@
|
||||
import App from './app.js';
|
||||
import Life from './modules/life.js';
|
||||
|
||||
globalThis.goto = async tag => {
|
||||
let url;
|
||||
switch(tag) {
|
||||
case 'github': url = 'https://github.com/VickScarlet/lifeRestart'; break;
|
||||
case 'discord': url = 'https://discord.gg/U3qrf49NMQ'; break;
|
||||
}
|
||||
try {
|
||||
window.open(url, '_blank');
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
globalThis.$$eventMap = new Map();
|
||||
globalThis.$$event = (tag, data) => {
|
||||
const listener = $$eventMap.get(tag);
|
||||
@@ -165,5 +178,5 @@ core.config({
|
||||
],
|
||||
},
|
||||
},
|
||||
})
|
||||
});
|
||||
game.start(query);
|
||||
|
Reference in New Issue
Block a user