Skip to content

Commit

Permalink
fix: Correction du cache des thèmes
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulBayfield committed Dec 15, 2024
1 parent 43f244f commit d4b07d8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ async function getCustomTheme() {
const lastFetchTimestamp = await browser.storage.local.get(lastFetchTimestampKey);

// Récupère le thème personnalisé toutes les heures
// if (!lastFetchTimestamp[lastFetchTimestampKey] || currentTimestamp - lastFetchTimestamp[lastFetchTimestampKey] > 3600000) {
if (1 === 1) {
if (!lastFetchTimestamp[lastFetchTimestampKey] || currentTimestamp - lastFetchTimestamp[lastFetchTimestampKey] > 3600000) {
// if (1 === 1) {
console.info("[Better IUT RCC] 📑 Récupération du thème personnalisé...");
const metadataResponse = await fetch(`https://betteriutrcc.bayfield.dev/v1/themes/${themeName}`);

Expand All @@ -76,8 +76,8 @@ async function getCustomTheme() {

const cache = await browser.storage.local.get(storageKey);

// if (cache[storageKey]) {
if (1 !== 1) {
if (cache[storageKey]) {
// if (1 !== 1) {
console.info(`[Better IUT RCC] Thème trouvé en cache (${storageKey})`);
injectCSS(cache[storageKey]);
} else {
Expand Down

0 comments on commit d4b07d8

Please sign in to comment.