aboutsummaryrefslogtreecommitdiff
path: root/views/script
diff options
context:
space:
mode:
Diffstat (limited to 'views/script')
-rw-r--r--views/script/game_music.js6
-rw-r--r--views/script/loader_global.js3
-rw-r--r--views/script/menu_login.js4
-rw-r--r--views/script/menu_music.js2
4 files changed, 7 insertions, 8 deletions
diff --git a/views/script/game_music.js b/views/script/game_music.js
index 2aa7e94..7d43a25 100644
--- a/views/script/game_music.js
+++ b/views/script/game_music.js
@@ -1,8 +1,8 @@
startHooks.push(() => {
info("MusicMgr", "Playing game" + i + ".mp3");
- require('electron').ipcRenderer.send('newmusic', kresources.music['game' + i].file);
+ if (require('@electron/remote').getCurrentWindow().music) require('electron').ipcRenderer.send('newmusic', kresources.music['game' + i].file);
})
if (location.search === "?online") {
- require('electron').ipcRenderer.send('newmusic', kresources.music['prepare'].file);
-} \ No newline at end of file
+ if (require('@electron/remote').getCurrentWindow().music) require('electron').ipcRenderer.send('newmusic', kresources.music['prepare'].file);
+}
diff --git a/views/script/loader_global.js b/views/script/loader_global.js
index 81b4dd7..2333db4 100644
--- a/views/script/loader_global.js
+++ b/views/script/loader_global.js
@@ -2,6 +2,9 @@ const $ = require('jquery');
require('electron').ipcRenderer.on('ready', (e, a) => {
document.getElementById("banner-decoration").style.display = "";
+ document.getElementById("banner-outer").style.backgroundImage = "";
+ document.getElementById("banner-outer").style.backgroundColor = "#042349";
+ document.getElementById("banner-contrast").style.display = "none";
setTimeout(() => {
if (native) {
diff --git a/views/script/menu_login.js b/views/script/menu_login.js
index f2d7c7e..57b4bbc 100644
--- a/views/script/menu_login.js
+++ b/views/script/menu_login.js
@@ -88,7 +88,6 @@ window.addEventListener('load', () => {
onlineMode = false;
postOnlineMode();
document.getElementById("loginIntro").innerText = lang.polymer.error[2];
- document.getElementById("online").parentElement.parentElement.outerHTML = "";
})
}).catch((e) => {
require('@electron/remote').getCurrentWindow().webContents.send("notification", {title: lang.polymer.error[0], message: lang.polymer.error[1]});
@@ -96,7 +95,6 @@ window.addEventListener('load', () => {
onlineMode = false;
postOnlineMode();
document.getElementById("loginIntro").innerText = lang.polymer.error[2];
- document.getElementById("online").parentElement.parentElement.outerHTML = "";
})
}).catch((e) => {
require('@electron/remote').getCurrentWindow().webContents.send("notification", {title: lang.polymer.error[0], message: lang.polymer.error[1]});
@@ -104,7 +102,6 @@ window.addEventListener('load', () => {
onlineMode = false;
postOnlineMode();
document.getElementById("loginIntro").innerText = lang.polymer.error[2];
- document.getElementById("online").parentElement.parentElement.outerHTML = "";
})
})
@@ -237,6 +234,5 @@ function postOnlineMode() {
console.error(e);
onlineMode = false;
document.getElementById("loginIntro").innerText = lang.polymer.error[2];
- document.getElementById("online").parentElement.parentElement.outerHTML = "";
}
} \ No newline at end of file
diff --git a/views/script/menu_music.js b/views/script/menu_music.js
index f1d23f9..d650478 100644
--- a/views/script/menu_music.js
+++ b/views/script/menu_music.js
@@ -1,5 +1,5 @@
if (location.search !== "?noreset") {
console.log("back");
- require('electron').ipcRenderer.send('newmusic', kresources.music['title'].file);
+ if (require('@electron/remote').getCurrentWindow().music) require('electron').ipcRenderer.send('newmusic', kresources.music['title'].file);
}
info("MenuWindow", "Menu opened");