Skip to content

Commit

Permalink
Disable hq banner image - keyvalue db down
Browse files Browse the repository at this point in the history
  • Loading branch information
amarullz committed Jul 2, 2024
1 parent 59858cb commit f944e70
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions app/src/main/assets/view/m.js
Original file line number Diff line number Diff line change
Expand Up @@ -5041,10 +5041,17 @@ const vtt={
};
/****************************** BANNER CACHE ******************************/
const bannerCacher={
enable:false,
key:'e4reefz8',
base:'https://keyvalue.immanuel.co/api/KeyVal',
cache:{},
get:function(id,cb){
if (!bannerCacher.enable){
requestAnimationFrame(function(){
cb(null);
});
return;
}
var vkey='c'+id;
if (vkey in bannerCacher.cache){
requestAnimationFrame(function(){
Expand All @@ -5068,6 +5075,12 @@ const bannerCacher={
});
},
set:function(id,val,cb){
if (!bannerCacher.enable){
requestAnimationFrame(function(){
cb(null);
});
return;
}
var vkey='c'+id;
if (bannerCacher.cache[vkey]){
requestAnimationFrame(function(){
Expand Down Expand Up @@ -10895,7 +10908,7 @@ const home={
pb.menu_init(home.home_slide);

function loadBannerImage(me, id, fallback){
if (!pb.cfg_data.alisthqbanner){
if (!pb.cfg_data.alisthqbanner || !bannerCacher.enable){
me.onload=function(){
this.classList.add('loaded');
};
Expand Down Expand Up @@ -16970,7 +16983,7 @@ const _MAL={
}
var banner_div=hl._banner=$n('div','alsd_banner',null,hl._content,'');
hl._banner.style.display='none';
if (!pb.cfg_data.alisthqbanner){
if (!pb.cfg_data.alisthqbanner || !bannerCacher.enable){
if (d.bannerImage){
banner_div.style.backgroundImage='url('+$img(d.bannerImage)+')';
banner_div.style.display='';
Expand Down

0 comments on commit f944e70

Please sign in to comment.