- if (
- !settings.disable_cache &&
- cachedStats &&
- settings.display_stats === cachedSetting
- ) {
- this.stats = cachedStats;
- return;
- }
- try {
- const result = await ajax("/about.json");
- this.stats = result.about.stats;
- if (settings.disable_cache) {
- localStorage.removeItem("about_stats");
- localStorage.removeItem("banner_stats_setting");
- } else {
- this.cacheStats();
- }
- } catch (error) {
- this.stats = null;
- // eslint-disable-next-line no-console