Ci-dessous, les différences entre deux révisions de la page.
| 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] – avillepreux | js:wrap_songlink [2026/05/28 13:07] (Version actuelle) – avillepreux |
|---|
| |
| 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>'); |
| |
| }); | }); |