mirror of
https://github.com/ReVanced/revanced-website.git
synced 2026-01-24 19:31:03 +00:00
preloading and one fix
This commit is contained in:
@@ -114,12 +114,26 @@
|
||||
transitionDirection = -5;
|
||||
}
|
||||
|
||||
function preloadImage(url: string) {
|
||||
var img=new Image();
|
||||
img.src=url;
|
||||
}
|
||||
|
||||
function nextPage() {
|
||||
if (currentPage >= logoPages || submit) return null;
|
||||
currentPage++;
|
||||
|
||||
min = currentPage * logoAmount;
|
||||
max = min + logoAmount;
|
||||
|
||||
if (currentPage < logoPages) {
|
||||
const nextPage = currentPage + 1;
|
||||
const nextMin = nextPage * logoAmount;
|
||||
const nextMax = nextMin + logoAmount;
|
||||
logos.slice(nextMin, nextMax).forEach(({ variants }) => {
|
||||
variants.forEach(variant => preloadImage(variant.gdrive_direct_url));
|
||||
});
|
||||
}
|
||||
transitionDirection = 5;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user