Formatting

This commit is contained in:
rockerBOO
2025-04-30 20:41:51 -04:00
parent 1f7ce1890a
commit 70b36ed1a1
19 changed files with 4429 additions and 1583 deletions

View File

@@ -1,24 +1,24 @@
'use strict';
var save_player_pos_key = 'save_player_pos';
"use strict";
var save_player_pos_key = "save_player_pos";
function get_all_video_times() {
return helpers.storage.get(save_player_pos_key) || {};
return helpers.storage.get(save_player_pos_key) || {};
}
document.querySelectorAll('.watched-indicator').forEach(function (indicator) {
var watched_part = get_all_video_times()[indicator.dataset.id];
var total = parseInt(indicator.dataset.length, 10);
if (watched_part === undefined) {
watched_part = total;
}
var percentage = Math.round((watched_part / total) * 100);
document.querySelectorAll(".watched-indicator").forEach(function (indicator) {
var watched_part = get_all_video_times()[indicator.dataset.id];
var total = parseInt(indicator.dataset.length, 10);
if (watched_part === undefined) {
watched_part = total;
}
var percentage = Math.round((watched_part / total) * 100);
if (percentage < 5) {
percentage = 5;
}
if (percentage > 90) {
percentage = 100;
}
if (percentage < 5) {
percentage = 5;
}
if (percentage > 90) {
percentage = 100;
}
indicator.style.width = percentage + '%';
indicator.style.width = percentage + "%";
});