Skip to content

Commit

Permalink
Corrigindo distorção no video
Browse files Browse the repository at this point in the history
  • Loading branch information
SonanFarr committed Nov 15, 2023
1 parent 2fb4e6f commit 1e7c4a4
Showing 1 changed file with 27 additions and 25 deletions.
52 changes: 27 additions & 25 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -327,34 +327,36 @@ <h1>Sons</h1>
</script>
<script>
window.addEventListener("orientationchange", function(event) {
var counter_left = document.getElementById('reps-left').innerText;
var counter_right = document.getElementById('reps-right').innerText;
var counter_series = document.getElementById('sets').innerText;
var counter_descanso = document.getElementById('rest').innerText;

var max_left = document.getElementById('reps-left-max').innerText;
var max_right = document.getElementById('reps-right-max').innerText;
var max_series = document.getElementById('sets-max').innerText;

localStorage.setItem("counter_left", counter_left);
localStorage.setItem("counter_right", counter_right);
localStorage.setItem("counter_series", counter_series);
localStorage.setItem("counter_descanso", counter_descanso);

localStorage.setItem("max_left", max_left);
localStorage.setItem("max_right", max_right);
localStorage.setItem("max_series", max_series);
var counter_left = document.getElementById('reps-left').innerHtml;
var counter_right = document.getElementById('reps-right').innerHtml;
var counter_series = document.getElementById('sets').innerHtml;
var counter_descanso = document.getElementById('rest').innerHtml;

var max_left = document.getElementById('reps-left-max').innerHtml;
var max_right = document.getElementById('reps-right-max').innerHtml;
var max_series = document.getElementById('sets-max').innerHtml;

sessionStorage.setItem("counter_left", counter_left);
sessionStorage.setItem("counter_right", counter_right);
sessionStorage.setItem("counter_series", counter_series);
sessionStorage.setItem("counter_descanso", counter_descanso);

sessionStorage.setItem("max_left", max_left);
sessionStorage.setItem("max_right", max_right);
sessionStorage.setItem("max_series", max_series);

window.location.reload();

document.getElementById('reps-left').innerText = localStorage.getItem("counter_left");
document.getElementById('reps-right').innerText = localStorage.getItem("counter_right");
document.getElementById('sets').innerText = localStorage.getItem("counter_series");
document.getElementById('rest').innerText = localStorage.getItem("counter_descanso");

document.getElementById('reps-left-max').innerText = localStorage.getItem("max_left");
document.getElementById('reps-right-max').innerText = localStorage.getItem("max_right");
document.getElementById('sets-max').innerText = localStorage.getItem("max_series");
document.getElementById('reps-left').innerText = sessionStorage.getItem("counter_left");
document.getElementById('reps-right').innerText = sessionStorage.getItem("counter_right");
document.getElementById('sets').innerText = sessionStorage.getItem("counter_series");
document.getElementById('rest').innerText = sessionStorage.getItem("counter_descanso");

document.getElementById('reps-left-max').innerText = sessionStorage.getItem("max_left");
document.getElementById('reps-right-max').innerText = sessionStorage.getItem("max_right");
document.getElementById('sets-max').innerText = sessionStorage.getItem("max_series");

sessionStorage.clear();
});
</script>
</body>
Expand Down

0 comments on commit 1e7c4a4

Please sign in to comment.