Making the dark mode switch work.

This commit is contained in:
Anonymus Raccoon
2019-05-25 18:59:23 +02:00
parent b4bb1ba20c
commit 802e47bafd
3 changed files with 33 additions and 43 deletions

View File

@@ -26,12 +26,13 @@
<p>To add game please wait 10 years and come back here.</p>
<h1 name ="Man">Appearances</h1>
<p>Use the dark mode: </p> <span><div class="switch">
<p>Use the dark mode: </p> <span>
<div class="switch">
<label>
Off
<input type="checkbox">
<span class="lever"></span>
On
Off
<input type="checkbox">
<span class="lever"></span>
On
</label>
</div>
</span>
@@ -47,12 +48,10 @@
shell.openExternal(event.currentTarget.href);
});
if($("#body").hasClass("dark-mode"))
{
console.log("dark mode is on");
console.log("switch: " + $(".switch"));
$(".switch").prop("checked", true); //Lol ca marche pas
$(".switch").find("input[type=checkbox]").prop("checked", true);
}
$(".switch").find("input[type=checkbox]").on("change",function() {

View File

@@ -7,8 +7,8 @@
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
<script>if (typeof module === 'object') { window.module = module; module = undefined; }</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<!-- <script src="../../node_modules/jquery/dist/jquery.min.js"></script> !-->
<!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script> !-->
<script src="../../node_modules/jquery/dist/jquery.min.js"></script>
<script>if (window.module) module = window.module;</script>
<script src="../js/electron-specific.js"></script> <!--Using this script because electrons scripts cant be compiled-->

55
package-lock.json generated
View File

@@ -4068,9 +4068,9 @@
}
},
"fstream": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz",
"integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=",
"version": "1.0.12",
"resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz",
"integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==",
"dev": true,
"requires": {
"graceful-fs": "^4.1.2",
@@ -6286,15 +6286,6 @@
"write-file-atomic": "^2.3.0"
}
},
"block-stream": {
"version": "0.0.9",
"resolved": false,
"integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=",
"dev": true,
"requires": {
"inherits": "~2.0.0"
}
},
"bluebird": {
"version": "3.5.3",
"resolved": false,
@@ -7174,18 +7165,6 @@
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
"dev": true
},
"fstream": {
"version": "1.0.11",
"resolved": false,
"integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=",
"dev": true,
"requires": {
"graceful-fs": "^4.1.2",
"inherits": "~2.0.0",
"mkdirp": ">=0.5 0",
"rimraf": "2"
}
},
"gauge": {
"version": "2.7.4",
"resolved": false,
@@ -8241,6 +8220,18 @@
"which": "1"
},
"dependencies": {
"fstream": {
"version": "1.0.12",
"resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz",
"integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==",
"dev": true,
"requires": {
"graceful-fs": "^4.1.2",
"inherits": "~2.0.0",
"mkdirp": ">=0.5 0",
"rimraf": "2"
}
},
"nopt": {
"version": "3.0.6",
"resolved": false,
@@ -8257,13 +8248,13 @@
"dev": true
},
"tar": {
"version": "2.2.1",
"resolved": false,
"integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=",
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz",
"integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==",
"dev": true,
"requires": {
"block-stream": "*",
"fstream": "^1.0.2",
"fstream": "^1.0.12",
"inherits": "2"
}
}
@@ -11757,13 +11748,13 @@
"dev": true
},
"tar": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz",
"integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=",
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz",
"integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==",
"dev": true,
"requires": {
"block-stream": "*",
"fstream": "^1.0.2",
"fstream": "^1.0.12",
"inherits": "2"
}
},