MCPcopy Create free account
hub / github.com/FreeMovieIR/freemovieir.github.io / startLoadingBar

Function startLoadingBar

script.js:19–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17const imageCache = {};
18
19// تابع برای دریافت یا ذخیره تصویر از/در کش
20function getCachedImage(id, fetchFunction) {
21 if (imageCache[id] && imageCache[id] !== defaultPoster) {
22 console.log(`تصویر کش‌شده برای شناسه ${id} بارگذاری شد`);
23 return Promise.resolve(imageCache[id]);
24 }
25 return fetchFunction().then(poster => {
26 if (poster !== defaultPoster) {
27 imageCache[id] = poster;
28 console.log(`تصویر برای شناسه ${id} در کش ذخیره شد`);
29 } else {
30 console.log(`تصویر پیش‌فرض ${defaultPoster} کش نشد`);

Callers 1

fetchAndDisplayContentFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected