gfd
This commit is contained in:
+27
-1
@@ -3909,6 +3909,13 @@ window.cancelAnimFrame = (function () {
|
||||
});
|
||||
} else {
|
||||
_container.insertAdjacentHTML('beforeend', _html);
|
||||
if (options.direction) {
|
||||
const _newContent = _container.querySelector('.content');
|
||||
if (_newContent) {
|
||||
_newContent.classList.remove('slide-next', 'slide-prev');
|
||||
_newContent.classList.add(options.direction === 'next' ? 'slide-next' : 'slide-prev');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (useOnara) {
|
||||
@@ -4115,6 +4122,13 @@ window.cancelAnimFrame = (function () {
|
||||
});
|
||||
} else {
|
||||
container.insertAdjacentHTML('beforeend', html);
|
||||
if (options.direction) {
|
||||
const newContent = container.querySelector('.content');
|
||||
if (newContent) {
|
||||
newContent.classList.remove('slide-next', 'slide-prev');
|
||||
newContent.classList.add(options.direction === 'next' ? 'slide-next' : 'slide-prev');
|
||||
}
|
||||
}
|
||||
|
||||
// Note: Prefetching video src immediately after DOM injection has been removed
|
||||
// because concurrent media requests to the same URL in Chromium-based browsers
|
||||
@@ -4446,10 +4460,22 @@ window.cancelAnimFrame = (function () {
|
||||
|
||||
// Standard item links
|
||||
e.preventDefault();
|
||||
const isNext = link.id === 'next' || link.classList.contains('nav-next');
|
||||
const isPrev = link.id === 'prev' || link.classList.contains('nav-prev');
|
||||
const direction = isNext ? 'next' : (isPrev ? 'prev' : null);
|
||||
|
||||
if (direction) {
|
||||
const curContent = document.querySelector('.content');
|
||||
if (curContent) {
|
||||
curContent.classList.remove('slide-out-left', 'slide-out-right', 'slide-next', 'slide-prev');
|
||||
curContent.classList.add(direction === 'next' ? 'slide-out-left' : 'slide-out-right');
|
||||
}
|
||||
}
|
||||
|
||||
if (link.href.match(/\/p\/\d+/) || link.href.match(/[?&]page=\d+/)) {
|
||||
loadPageAjax(link.href);
|
||||
} else {
|
||||
loadItemAjax(link.href, true);
|
||||
loadItemAjax(link.href, true, { direction });
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user