aboutsummaryrefslogtreecommitdiffstats
path: root/src/index.html
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2018-11-22 14:14:25 +0100
committerLibravatar Stefan Malzner <stefan@adlk.io>2018-11-22 14:14:25 +0100
commit46b8c8c4b3a5b80e0187b284abc84566a7e784db (patch)
tree7fd378bcdd18e78c42dfeb61a15f89fd10106046 /src/index.html
parentADD features loading spinner (diff)
parentfeat(App): Add option to enable dark mode for supported services (diff)
downloadferdium-app-46b8c8c4b3a5b80e0187b284abc84566a7e784db.tar.gz
ferdium-app-46b8c8c4b3a5b80e0187b284abc84566a7e784db.tar.zst
ferdium-app-46b8c8c4b3a5b80e0187b284abc84566a7e784db.zip
Merge branch 'develop' into feature/features-api
Diffstat (limited to 'src/index.html')
-rw-r--r--src/index.html13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/index.html b/src/index.html
index 9e5acd705..5ce7f6a96 100644
--- a/src/index.html
+++ b/src/index.html
@@ -11,10 +11,15 @@
11 <div class="dev-warning">DEV MODE</div> 11 <div class="dev-warning">DEV MODE</div>
12 <div id="root"></div> 12 <div id="root"></div>
13 <script> 13 <script>
14 document.querySelector('body').classList.add(process.platform); 14 document.querySelector('body').classList.add(process.env.OS_PLATFORM ? process.env.OS_PLATFORM : process.platform);
15 15
16 const { isDevMode } = require('./environment'); 16 const { isDevMode } = require('./environment');
17 if (isDevMode) { 17 if (isDevMode) {
18 const debugging = require('debug');
19 debugging.enable(process.env.DEBUG);
20
21 const debug = debugging('Index');
22
18 document.querySelector('body').classList.add('isDevMode'); 23 document.querySelector('body').classList.add('isDevMode');
19 24
20 (function() { 25 (function() {
@@ -25,7 +30,7 @@
25 document.body.appendChild(s); 30 document.body.appendChild(s);
26 31
27 s.onload = () => { 32 s.onload = () => {
28 console.log('livereload loaded'); 33 debug('livereload loaded');
29 const originalReloadBehaviour = window._onLiveReloadFileChanged; 34 const originalReloadBehaviour = window._onLiveReloadFileChanged;
30 35
31 window._onLiveReloadFileChanged = (file) => { 36 window._onLiveReloadFileChanged = (file) => {
@@ -33,10 +38,10 @@
33 originalReloadBehaviour(file); 38 originalReloadBehaviour(file);
34 } else { 39 } else {
35 if (file.path.includes('/build/webview/')) { 40 if (file.path.includes('/build/webview/')) {
36 console.log('Livereload: Reloading all webvies'); 41 debug('Livereload: Reloading all webvies');
37 const webviews = document.querySelectorAll('webview').forEach(webview => webview.reload()); 42 const webviews = document.querySelectorAll('webview').forEach(webview => webview.reload());
38 } else { 43 } else {
39 console.log('Livereload: skip reload as only main process files have changed'); 44 debug('Livereload: skip reload as only main process files have changed');
40 } 45 }
41 } 46 }
42 } 47 }