mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-30 02:03:16 +00:00
Update timeline.js
This commit is contained in:
parent
c44dcca592
commit
e0760ff74a
1 changed files with 12 additions and 1 deletions
13
resources/assets/js/timeline.js
vendored
13
resources/assets/js/timeline.js
vendored
|
@ -3,7 +3,12 @@ $(document).ready(function() {
|
||||||
$('.container.timeline-container').removeClass('d-none');
|
$('.container.timeline-container').removeClass('d-none');
|
||||||
let elem = document.querySelector('.timeline-feed');
|
let elem = document.querySelector('.timeline-feed');
|
||||||
pixelfed.fetchLikes();
|
pixelfed.fetchLikes();
|
||||||
|
$('video').on('play', function() {
|
||||||
|
activated = this;
|
||||||
|
$('video').each(function() {
|
||||||
|
if(this != activated) this.pause();
|
||||||
|
});
|
||||||
|
});
|
||||||
let infScroll = new InfiniteScroll( elem, {
|
let infScroll = new InfiniteScroll( elem, {
|
||||||
path: '.pagination__next',
|
path: '.pagination__next',
|
||||||
append: '.timeline-feed',
|
append: '.timeline-feed',
|
||||||
|
@ -19,6 +24,12 @@ $(document).ready(function() {
|
||||||
$(this).addClass('d-none');
|
$(this).addClass('d-none');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
$('video').on('play', function() {
|
||||||
|
activated = this;
|
||||||
|
$('video').each(function() {
|
||||||
|
if(this != activated) this.pause();
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue