js:wrap_songlink

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
js:wrap_songlink [2026/05/28 12:30] avillepreuxjs:wrap_songlink [2026/05/28 13:07] (Version actuelle) avillepreux
Ligne 16: Ligne 16:
  
             var $wrap = jQuery(this);             var $wrap = jQuery(this);
-        var id   = $wrap.text();+        var id   = $wrap.text().trim();
  
-            $wrap.html('<iframe width="100%" height="150" style="padding: .5rem; background: #000; border: .25rem solid #fff;" src="https://embed.odesli.co/?&theme=dark&url=spotify:track:'+id+'" frameborder="0" allowtransparency allowfullscreen sandbox="allow-same-origin allow-scripts allow-presentation allow-popups allow-popups-to-escape-sandbox"></iframe>');+            $wrap.html('<iframe width="100%" height="150" style="margin: .5rem; padding: .5rem; background: #000; border: .25rem solid #fff;" src="https://embed.odesli.co/?theme=dark&url=' + encodeURIComponent('https://open.spotify.com/track/' + id) + '" frameborder="0" allowtransparency allowfullscreen sandbox="allow-same-origin allow-scripts allow-presentation allow-popups allow-popups-to-escape-sandbox"></iframe>'); 
 + 
 +        }); 
 +          
 +        jQuery(".wrap_albumlink").each(function() { 
 + 
 +            var $wrap = jQuery(this); 
 +        var id   = $wrap.text().trim(); 
 + 
 +            $wrap.html('<iframe width="100%" height="150" style="margin.5rem; padding: .5rem; background: #000; border: .25rem solid #fff;" src="https://embed.odesli.co/?theme=dark&url=' + encodeURIComponent('https://open.spotify.com/album/' + id+ '" frameborder="0" allowtransparency allowfullscreen sandbox="allow-same-origin allow-scripts allow-presentation allow-popups allow-popups-to-escape-sandbox"></iframe>');
  
         });         });
  • js/wrap_songlink.1779964241.txt.gz
  • Dernière modification : 2026/05/28 12:30
  • de avillepreux