Skip to content

Commit

Permalink
mute/unmute btn
Browse files Browse the repository at this point in the history
  • Loading branch information
Fefedu973 committed Jul 8, 2022
1 parent 62e6b28 commit 0fb4200
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "fefe_du_973-launcher",
"preductname": "Fefe_du_973 Launcher",
"version": "1.2.0",
"version": "1.3.0",
"description": "Launcher minecraft custom pour le serveur minecraft Fefe_du_973 avec modpack (premium + crack)",
"main": "src/app.js",
"author": "Autheur et créateur principal : Luuxis - Fork : Fefe_du_973",
Expand Down
20 changes: 19 additions & 1 deletion src/assets/css/panels/settings.css
Original file line number Diff line number Diff line change
Expand Up @@ -521,4 +521,22 @@
.checkbox-settings+label {
display: inline-block;
margin-right: 8px;
}
}

.mutebtn {
font: normal normal bold 13px/20px Poppins;
border-radius: 18px;
padding: 8px 30px;
background: rgb(81,236,87);
background: radial-gradient(circle, rgba(81,236,87,1) 0%, rgba(71,189,90,1) 100%);
cursor: pointer;
margin-left: 20px;
border: none;
outline: none;
transition: ease-in-out 0.5s;
}

.mutebtn:hover {
box-shadow: 0 0 15px #38a14a;
transform: scale(1.05);
}
3 changes: 3 additions & 0 deletions src/assets/images/logo/mute.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/images/logo/unmute.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions src/launcher.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,21 @@
</div>
</body>
<script>
function toggleMute() {

var video=document.getElementById("myVideo")
var div=document.getElementById('button');

if(video.muted){
video.muted = false;
div.innerHTML = `<button class="mutebtn" id="btn" onclick="toggleMute();">Mute <img id="muteimg" style="width: 25px;margin-left: 6px;vertical-align: middle;" src="assets/images/logo/mute.svg"></button>`;

} else {
video.muted = true;
div.innerHTML = `<button class="mutebtn" id="btn" onclick="toggleMute();">Unmute <img id="muteimg" style="width: 25px;margin-left: 6px;vertical-align: middle;" src="assets/images/logo/unmute.svg"></button>`;
}

}
var videoContainer = document.getElementById('videoContainer'),
output = document.getElementById('output'),
nextVideo,
Expand Down
10 changes: 0 additions & 10 deletions src/panels/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,8 @@
<div class="socialLinkMedia WebsiteMedia"></div>
<span>Website</span>
</div>
<button id="myBtn">Try it</button>

<p id="demo"></p>
</div>
</div>
</div>
</div>
</div>
<script>
document.getElementById("myBtn").addEventListener("click", mute);

function mute() {
console.log(`test`)
}
</script>
5 changes: 5 additions & 0 deletions src/panels/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@
<input type="checkbox" class="checkbox-settings" id="launcher-close-all"><label for="launcher-close-all"><div class="checkround"></div></label> Fermer le jeu si le launcher est fermé.</br>
<input type="checkbox" class="checkbox-settings" id="launcher-open"><label for="launcher-open"><div class="checkround"></div></label> Garder le launcher ouvert après le lancement du jeu.
</div>
<div class="title-settings">Paramètre du son.</div>
<div class="java-settings information">
Pour couper le son de launcher :
<div style="display: block;position: absolute;top: 12px;left: 272px;" id="button"><button class="mutebtn" id="btn" onclick="toggleMute();"> Mute <img id="muteimg" style="width: 25px;margin-left: 6px;vertical-align: middle;" src="assets/images/logo/mute.svg"></button></div>
</div>
</div>
</div>
</div>

0 comments on commit 0fb4200

Please sign in to comment.