AltStyle によって変換されたページ (->オリジナル) /

Meme Encyclopedia
Media
Editorials
More

Popular right now

Red Scare podcast main logo image.

Red Scare Podcast

Aidan Walker

Aidan Walker • 3 years ago

Model vs. Cashier

Phillip Hamilton

Phillip Hamilton • 2 years ago

Lily Lang SEC Burnerverse Trolling image and meme examples.

Lily Lang SEC Burnerverse Trolling

Sakshi Sanjeevkumar

Sakshi Sanjeevkumar • about a year ago

The What Rug Doctor Woman Ad Meme Template | Woman cleaning carpet with blank stare and smile

The What / Rug Doctor Woman Ad

Zach Sweat

Zach Sweat • 5 years ago

May the Force Be With You TikTok Video image example.

"May the Force Be With You" TikTok Video

Phillip Hamilton

Phillip Hamilton • 3 days ago

Know Your Meme is the property of Literally Media ©2024 Literally Media. All Rights Reserved.
> const CACHE_EXPIRY_MS = 15 * 60 * 1000; const fetchUserData = async (thumbableType = null) => { let cached = localStorage.getItem('user_data_cache'); let cacheData = null; let timestamp = 0; if (cached) { try { const parsed = JSON.parse(cached); cacheData = parsed.data; timestamp = parsed.timestamp; } catch { console.warn('Corrupt cached data, resetting...'); } } const isFresh = Date.now() - timestamp < CACHE_EXPIRY_MS; if (isFresh && cacheData && (!thumbableType || cacheData.interaction_data?.[thumbableType])) { return cacheData; } try { const query = thumbableType ? `?thumbable_type=${encodeURIComponent(thumbableType)}` : ''; const response = await fetch(`/user_data.json${query}`, { headers: { 'Accept': 'application/json' }, credentials: 'include' }); if (!response.ok) { throw new Error(`HTTP error! Status: ${response.status}`); } const newData = await response.json(); if (cacheData && newData.interaction_data) { cacheData = { ...newData, interaction_data: { ...cacheData.interaction_data, ...newData.interaction_data } }; } else { cacheData = newData; } localStorage.setItem('user_data_cache', JSON.stringify({ timestamp: Date.now(), data: cacheData })); return cacheData; } catch (error) { console.error('Error fetching user interactions:', error); return cacheData; } }; function updateUserInteractions() { const pageType = getPageType(); const contentType = getContentType(); const interactionData = ((window.userData || {}).interaction_data || {})[contentType] || {}; const likes = new Set(interactionData.likes); const dislikes = new Set(interactionData.dislikes); const favorites = new Set(interactionData.favorites); Array.from(document.querySelectorAll('.favorite')).forEach(favoriteElement => { const itemType = favoriteElement.dataset.itemType; const itemId = parseInt(favoriteElement.dataset.itemId); if (!itemType || !itemId) return; const itemFavorites = ((window.userData || {}).interaction_data || {})[itemType] || {}; const itemFavoritesSet = new Set(itemFavorites.favorites || []); if (itemFavoritesSet.has(itemId)) { favoriteElement.classList.add('on'); favoriteElement.classList.remove('off'); } else { favoriteElement.classList.add('off'); favoriteElement.classList.remove('on'