this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: TikTok opengraph again

+28 -1
+28 -1
internal/templates/views/index.html
··· 323 323 var embedHtmlEncoded = container.getAttribute('data-embed-html'); 324 324 if (embedHtmlEncoded) { 325 325 var embedHtml = decodeURIComponent(embedHtmlEncoded); 326 + 327 + // Check if this is a TikTok embed 328 + var isTikTok = embedHtml.indexOf('tiktok-embed') !== -1; 329 + 326 330 container.innerHTML = embedHtml; 327 331 container.onclick = null; 328 332 container.classList.remove('is-video'); 329 333 container.style.cursor = 'default'; 330 334 331 - // Manually execute scripts (innerHTML does not execute them) 335 + // TikTok requires special handling - reload script with cache busting 336 + if (isTikTok) { 337 + // Remove the script tag from the embed HTML (we'll load it properly) 338 + var scripts = container.getElementsByTagName('script'); 339 + while (scripts.length > 0) { 340 + scripts[0].parentNode.removeChild(scripts[0]); 341 + } 342 + 343 + // Remove any existing TikTok embed script 344 + var existingScript = document.getElementById('tiktok-embed-script'); 345 + if (existingScript) { 346 + existingScript.parentNode.removeChild(existingScript); 347 + } 348 + 349 + // Load TikTok embed.js with cache busting to force re-initialization 350 + var newScript = document.createElement('script'); 351 + newScript.src = 'https://www.tiktok.com/embed.js?t=' + Date.now(); 352 + newScript.id = 'tiktok-embed-script'; 353 + newScript.async = true; 354 + document.head.appendChild(newScript); 355 + return; 356 + } 357 + 358 + // For non-TikTok embeds, manually execute scripts (innerHTML does not execute them) 332 359 var scripts = container.getElementsByTagName('script'); 333 360 for (var i = 0; i < scripts.length; i++) { 334 361 var oldScript = scripts[i];