mirror of
https://github.com/iv-org/invidious.git
synced 2025-08-01 10:56:06 -04:00
Fixed thumbnails with darkreader, Added watched indicator in more locations
This commit is contained in:
parent
7b57381773
commit
f604c1c68b
3 changed files with 26 additions and 10 deletions
|
@ -41,15 +41,13 @@ function get_all_video_times() {
|
|||
}
|
||||
|
||||
var watchedIndicators = document.getElementsByClassName('watched-indicator');
|
||||
console.log('indicators', watchedIndicators.length);
|
||||
for (var i = 0; i < watchedIndicators.length; i++) {
|
||||
var indicator = watchedIndicators[i];
|
||||
|
||||
var watched_part = get_all_video_times()[indicator.getAttribute('data-id')];
|
||||
var total = parseInt(indicator.getAttribute('data-length'), 10);
|
||||
|
||||
var percentage = Math.round((watched_part / total) * 100);
|
||||
|
||||
|
||||
if (percentage < 5) {
|
||||
percentage = 5;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue