Compare commits
3 Commits
3e264237b8
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f442b8af1e | ||
|
|
ee3f32b6cb | ||
|
|
e75ffc06e5 |
@@ -1,5 +1,5 @@
|
|||||||
var exerciseTypes = [
|
var exerciseTypes = [
|
||||||
{ name: "One Arm Dumbbell Row", tags: ["back"] },
|
{ name: "Row w/ One Arm Dumbbell", tags: ["back"] },
|
||||||
{ name: "Cable Row w/ Wide Neutral Grip", tags: ["back"] },
|
{ name: "Cable Row w/ Wide Neutral Grip", tags: ["back"] },
|
||||||
{ name: "Cable Row w/ Neutral Grip", tags: ["back"] },
|
{ name: "Cable Row w/ Neutral Grip", tags: ["back"] },
|
||||||
{ name: "Cable Row w/ Over Grip", tags: ["back"] },
|
{ name: "Cable Row w/ Over Grip", tags: ["back"] },
|
||||||
@@ -8,32 +8,38 @@ var exerciseTypes = [
|
|||||||
{ name: "Machine Row w/ Under Grip", tags: ["back"] },
|
{ name: "Machine Row w/ Under Grip", tags: ["back"] },
|
||||||
{ name: "Lat Pulldown Wide", tags: ["back"] },
|
{ name: "Lat Pulldown Wide", tags: ["back"] },
|
||||||
{ name: "Lat Pulldown Narrow", tags: ["back"] },
|
{ name: "Lat Pulldown Narrow", tags: ["back"] },
|
||||||
|
{ name: "Lat Pulldown Chinese", tags: ["back"] },
|
||||||
{ name: "Rear Deltoid Machine", tags: ["back"] },
|
{ name: "Rear Deltoid Machine", tags: ["back"] },
|
||||||
{ name: "Face Pull", tags: [] },
|
{ name: "Face Pull", tags: ["back"] },
|
||||||
{ name: "Over Grip Pull Up", tags: [] },
|
{ name: "Pull Up Over Grip", tags: [] },
|
||||||
{ name: "Under Grip Pull Up", tags: [] },
|
{ name: "Pull Up Under Grip", tags: [] },
|
||||||
|
{ name: "Side Raise", tags: ["shoulder"] },
|
||||||
{ name: "Military Press", tags: ["shoulder", "triceps"] },
|
{ name: "Military Press", tags: ["shoulder", "triceps"] },
|
||||||
{ name: "Machine Shoulder Press", tags: ["shoulder", "triceps"] },
|
{ name: "Shoulder Press Machine", tags: ["shoulder", "triceps"] },
|
||||||
{ name: "Dumbbell Shoulder Press", tags: ["shoulder", "triceps"] },
|
{ name: "Shoulder Press Dumbbell", tags: ["shoulder", "triceps"] },
|
||||||
{ name: "Incline Bench Press", tags: ["chest", "triceps"] },
|
{ name: "Incline Bench Press", tags: ["chest", "triceps"] },
|
||||||
{ name: "Incline Bench Press Dumbbell", tags: ["chest", "triceps"] },
|
{ name: "Incline Bench Press Dumbbell", tags: ["chest", "triceps"] },
|
||||||
{ name: "Bench Press", tags: ["chest", "triceps"] },
|
{ name: "Bench Press", tags: ["chest", "triceps"] },
|
||||||
{ name: "Bench Press Dumbbell", tags: ["chest", "triceps"] },
|
{ name: "Bench Press Dumbbell", tags: ["chest", "triceps"] },
|
||||||
|
{ name: "Bench Press Machine", tags: ["chest"] },
|
||||||
{ name: "Butterfly", tags: ["chest"] },
|
{ name: "Butterfly", tags: ["chest"] },
|
||||||
|
{ name: "Reverse Butterfly", tags: ["back"] },
|
||||||
{ name: "Dips", tags: ["chest", "triceps"] },
|
{ name: "Dips", tags: ["chest", "triceps"] },
|
||||||
{ name: "Cable Over Head Rope Triceps", tags: ["triceps"] },
|
{ name: "Triceps Cable Over Head Rope", tags: ["triceps"] },
|
||||||
{ name: "Cable Over Head Bar Triceps", tags: ["triceps"] },
|
{ name: "Triceps Cable Over Head Bar", tags: ["triceps"] },
|
||||||
{ name: "Cable Rope Triceps Extension", tags: ["triceps"] },
|
{ name: "Triceps Extension Cable Rope Triceps", tags: ["triceps"] },
|
||||||
{ name: "Cable Bar Triceps Extension", tags: ["triceps"] },
|
{ name: "Triceps Extension Cable Bar Triceps", tags: ["triceps"] },
|
||||||
|
{ name: "Triceps Machine", tags: ["triceps"] },
|
||||||
{ name: "Side Lateral Raise", tags: [] },
|
{ name: "Side Lateral Raise", tags: [] },
|
||||||
{ name: "Machine Bench Press", tags: ["chest"] },
|
{ name: "Biceps Curl Cable", tags: ["biceps"] },
|
||||||
{ name: "Cable Biceps Curl", tags: ["biceps"] },
|
{ name: "Biceps Machine", tags: ["biceps"] },
|
||||||
{ name: "21s", tags: ["biceps"] },
|
{ name: "21s", tags: ["biceps"] },
|
||||||
{ name: "Biceps Curl", tags: ["biceps"] },
|
{ name: "Biceps Curl", tags: ["biceps"] },
|
||||||
{ name: "Hammer Curl", tags: ["biceps"] },
|
{ name: "Hammer Curl", tags: ["biceps"] },
|
||||||
{ name: "Supported Biceps Curl", tags: ["biceps"] },
|
{ name: "Supported Biceps Curl", tags: ["biceps"] },
|
||||||
{ name: "Deadlift", tags: [] },
|
{ name: "Deadlift", tags: [] },
|
||||||
{ name: "Standing Calf Raises", tags: ["leg"] },
|
{ name: "Standing Calf Raises", tags: ["leg"] },
|
||||||
|
{ name: "Hamstring Curl", tags: ["leg"] },
|
||||||
{ name: "Leg Press", tags: ["leg"] },
|
{ name: "Leg Press", tags: ["leg"] },
|
||||||
{ name: "Squat", tags: ["leg"] },
|
{ name: "Squat", tags: ["leg"] },
|
||||||
{ name: "Leg Curl", tags: ["leg"] },
|
{ name: "Leg Curl", tags: ["leg"] },
|
||||||
|
|||||||
@@ -14,11 +14,9 @@
|
|||||||
|
|
||||||
<div id="workout-selection-area">
|
<div id="workout-selection-area">
|
||||||
<h2>Load Predefined Workout</h2>
|
<h2>Load Predefined Workout</h2>
|
||||||
<button class="loadPredefinedWorkout" id="load-leg-strength">Legs Strength</button>
|
<button class="loadPredefinedWorkout" id="monday">Monday</button>
|
||||||
<button class="loadPredefinedWorkout" id="load-body-strength">Upper Body Strength</button>
|
<button class="loadPredefinedWorkout" id="wednesday">Wednesday</button>
|
||||||
<button class="loadPredefinedWorkout" id="load-leg-hyp">Legs Hypertrophy</button>
|
<button class="loadPredefinedWorkout" id="friday">Friday</button>
|
||||||
<button class="loadPredefinedWorkout" id="load-chest-hyp">Chest-Triceps Hypertrophy</button>
|
|
||||||
<button class="loadPredefinedWorkout" id="load-back-hyp">Back-Biceps Hypertrophy</button>
|
|
||||||
</div>
|
</div>
|
||||||
<h2>Today's Workout</h2>
|
<h2>Today's Workout</h2>
|
||||||
<ul id="exercise-list">
|
<ul id="exercise-list">
|
||||||
|
|||||||
68
main.js
68
main.js
@@ -25,8 +25,10 @@ function updateExercises() {
|
|||||||
var workoutSelectionArea = document.getElementById("workout-selection-area");
|
var workoutSelectionArea = document.getElementById("workout-selection-area");
|
||||||
workoutSelectionArea.innerHTML = '';
|
workoutSelectionArea.innerHTML = '';
|
||||||
}
|
}
|
||||||
|
if (exercises[t] != null && exercises[t] != {}) {
|
||||||
localStorage.setItem("exercises", JSON.stringify(exercises));
|
localStorage.setItem("exercises", JSON.stringify(exercises));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function swap_right(i) {
|
function swap_right(i) {
|
||||||
if (0 <= i && i < exercises[t].length && 0 <= i + 1 && i + 1 < exercises[t].length) {
|
if (0 <= i && i < exercises[t].length && 0 <= i + 1 && i + 1 < exercises[t].length) {
|
||||||
@@ -137,50 +139,36 @@ addExerciseButton.onclick = () => {
|
|||||||
function loadPredefinedWorkouts(workoutType) {
|
function loadPredefinedWorkouts(workoutType) {
|
||||||
if (!exercisesEdited(exercises[t])) {
|
if (!exercisesEdited(exercises[t])) {
|
||||||
switch (workoutType) {
|
switch (workoutType) {
|
||||||
case ("load-leg-strength"):
|
case ("monday"):
|
||||||
exercises[t] = [
|
exercises[t] = [
|
||||||
{ exerciseType: "Squat", repetitionType: "2-4", reps: "", weight: "" },
|
{ exerciseType: "Squat", repetitionType: "3-5", reps: "", weight: "" },
|
||||||
{ exerciseType: "Leg Press", repetitionType: "2-4", reps: "", weight: "" },
|
{ exerciseType: "Military Press", repetitionType: "5-8", reps: "", weight: "" },
|
||||||
{ exerciseType: "Deadlift", repetitionType: "2-4", reps: "", weight: "" }
|
{ exerciseType: "Pull Up Under Grip", repetitionType: "8-12", reps: "", weight: "" },
|
||||||
|
{ exerciseType: "Butterfly", repetitionType: "8-12", reps: "", weight: "" },
|
||||||
|
{ exerciseType: "Pull Up Under Grip", repetitionType: "8-12", reps: "", weight: "" },
|
||||||
|
{ exerciseType: "Reverse Butterfly", repetitionType: "8-12", reps: "", weight: "" },
|
||||||
|
{ exerciseType: "Triceps Machine", repetitionType: "5-8", reps: "", weight: "" },
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
case ("load-back-hyp"):
|
case ("wednesday"):
|
||||||
exercises[t] = [
|
|
||||||
{ exerciseType: "One Arm Dumbbell Row", repetitionType: "3-5", reps: "", weight: "" },
|
|
||||||
{ exerciseType: "Lat Pulldown Wide", repetitionType: "2-4", reps: "", weight: "" },
|
|
||||||
{ exerciseType: "Lat Pulldown Narrow", repetitionType: "2-4", reps: "", weight: "" },
|
|
||||||
{ exerciseType: "Cable Row w/ Wide Neutral Grip", repetitionType: "2-4", reps: "", weight: "" },
|
|
||||||
{ exerciseType: "Rear Deltoid Machine", repetitionType: "2-4", reps: "", weight: "" },
|
|
||||||
{ exerciseType: "Biceps Curl", repetitionType: "Pyramid", reps: "", weight: "" }
|
|
||||||
];
|
|
||||||
break;
|
|
||||||
case ("load-body-strength"):
|
|
||||||
exercises[t] = [
|
|
||||||
{ exerciseType: "Bench Press", repetitionType: "2-4", reps: "", weight: "" },
|
|
||||||
{ exerciseType: "Cable Row w/ Over Grip", repetitionType: "2-4", reps: "", weight: "" },
|
|
||||||
{ exerciseType: "Dips", repetitionType: "3-5", reps: "", weight: "" },
|
|
||||||
{ exerciseType: "Under Grip Pull Up", repetitionType: "3-5", reps: "", weight: "" },
|
|
||||||
{ exerciseType: "Hammer Curl", repetitionType: "3-5", reps: "", weight: "" },
|
|
||||||
{ exerciseType: "Supported Biceps Curl", repetitionType: "3-5", reps: "", weight: "" }
|
|
||||||
];
|
|
||||||
break;
|
|
||||||
case ("load-leg-hyp"):
|
|
||||||
exercises[t] = [
|
|
||||||
{ exerciseType: "Leg Press", repetitionType: "5-8", reps: "", weight: "" },
|
|
||||||
{ exerciseType: "Squat", repetitionType: "8-12", reps: "", weight: "" },
|
|
||||||
{ exerciseType: "Leg Extension", repetitionType: "12-15", reps: "", weight: "" },
|
|
||||||
{ exerciseType: "Leg Curl", repetitionType: "15-20", reps: "", weight: "" },
|
|
||||||
{ exerciseType: "Standing Calf Raises", repetitionType: "8-12", reps: "", weight: "" }
|
|
||||||
];
|
|
||||||
break;
|
|
||||||
case ("load-chest-hyp"):
|
|
||||||
exercises[t] = [
|
exercises[t] = [
|
||||||
{ exerciseType: "Bench Press", repetitionType: "3-5", reps: "", weight: "" },
|
{ exerciseType: "Bench Press", repetitionType: "3-5", reps: "", weight: "" },
|
||||||
{ exerciseType: "Incline Bench Press", repetitionType: "5-8", reps: "", weight: "" },
|
{ exerciseType: "Cable Row w/ Neutral Grip", repetitionType: "5-8", reps: "", weight: "" },
|
||||||
{ exerciseType: "Machine Shoulder Press", repetitionType: "8-12", reps: "", weight: "" },
|
{ exerciseType: "Leg Press", repetitionType: "8-12", reps: "", weight: "" },
|
||||||
{ exerciseType: "Butterfly", repetitionType: "12-15", reps: "", weight: "" },
|
{ exerciseType: "Shoulder Press Machine", repetitionType: "5-8", reps: "", weight: "" },
|
||||||
{ exerciseType: "Side Lateral Raise", repetitionType: "5-8", reps: "", weight: "" },
|
{ exerciseType: "Lat Pulldown Wide", repetitionType: "8-12", reps: "", weight: "" },
|
||||||
{ exerciseType: "Cable Triceps", repetitionType: "3-5", reps: "", weight: "" }
|
{ exerciseType: "Side Raise", repetitionType: "8-12", reps: "", weight: "" }
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
case ("friday"):
|
||||||
|
exercises[t] = [
|
||||||
|
{ exerciseType: "Deadlift", repetitionType: "3-5", reps: "", weight: "" },
|
||||||
|
{ exerciseType: "Incline Bench Press Dumbbell", repetitionType: "5-8", reps: "", weight: "" },
|
||||||
|
{ exerciseType: "Pull Up Over Grip", repetitionType: "8-12", reps: "", weight: "" },
|
||||||
|
{ exerciseType: "Dips", repetitionType: "8-12", reps: "", weight: "" },
|
||||||
|
{ exerciseType: "Machine Row w/ Neutral Grip", repetitionType: "5-8", reps: "", weight: "" },
|
||||||
|
{ exerciseType: "Face Pull", repetitionType: "8-12", reps: "", weight: "" },
|
||||||
|
{ exerciseType: "Biceps Curl", repetitionType: "5-8", reps: "", weight: "" }
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -206,9 +194,11 @@ if (jsn != null) {
|
|||||||
for (let [date, value] of Object.entries(jsn).sort().reverse()) {
|
for (let [date, value] of Object.entries(jsn).sort().reverse()) {
|
||||||
s += date + "\n";
|
s += date + "\n";
|
||||||
for (let exercise of value) {
|
for (let exercise of value) {
|
||||||
|
if (exercise.reps != "" || exercise.weight != "") {
|
||||||
s += " " + exercise.exerciseType + ": " + exercise.weight + "kg x " + exercise.reps + " of " + exercise.repetitionType + "\n";
|
s += " " + exercise.exerciseType + ": " + exercise.weight + "kg x " + exercise.reps + " of " + exercise.repetitionType + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
pre.textContent = s;
|
pre.textContent = s;
|
||||||
body.appendChild(pre);
|
body.appendChild(pre);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user