|
|
@ -39,11 +39,9 @@ function get_all_video_times() {
|
|
|
|
return helpers.storage.get(save_player_pos_key) || {};
|
|
|
|
return helpers.storage.get(save_player_pos_key) || {};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var watchedIndicators = document.getElementsByClassName('watched-indicator');
|
|
|
|
document.querySelectorAll('.watched-indicator').forEach(function (indicator) {
|
|
|
|
for (var i = 0; i < watchedIndicators.length; i++) {
|
|
|
|
var watched_part = get_all_video_times()[indicator.dataset.id];
|
|
|
|
var indicator = watchedIndicators[i];
|
|
|
|
var total = parseInt(indicator.dataset.length, 10);
|
|
|
|
var watched_part = get_all_video_times()[indicator.getAttribute('data-id')];
|
|
|
|
|
|
|
|
var total = parseInt(indicator.getAttribute('data-length'), 10);
|
|
|
|
|
|
|
|
if (watched_part === undefined) {
|
|
|
|
if (watched_part === undefined) {
|
|
|
|
watched_part = total;
|
|
|
|
watched_part = total;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -57,4 +55,4 @@ for (var i = 0; i < watchedIndicators.length; i++) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
indicator.style.width = percentage + '%';
|
|
|
|
indicator.style.width = percentage + '%';
|
|
|
|
}
|
|
|
|
});
|
|
|
|