diff --git a/files/assets/events/shared/js/music.js b/files/assets/events/shared/js/music.js index 93bccd1e5..d1c3f079e 100644 --- a/files/assets/events/shared/js/music.js +++ b/files/assets/events/shared/js/music.js @@ -1,4 +1,4 @@ -if (!playing_music()) { +if (!playing_music() && !document.getElementsByClassName('twitter-embed') && !document.getElementsByClassName('reddit-embed')) { addEventListener("load", () => { const audio = document.getElementById('event-song'); diff --git a/files/templates/default.html b/files/templates/default.html index 35722d7eb..9536188c7 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -139,7 +139,7 @@ {% endif %} {% endif %} - {% if IS_MUSICAL_EVENT() and not IS_LOCALHOST and not (SITE_NAME == 'WPD' and not v) and (not v or v.event_music) and not (hole and hole.name == 'music') and not (u and u.song) and not (IS_HOMOWEEN() and p and p.award_count("haunt", v)) and not (p and p.embed and p.domain == 'x.com') and err != 406 %} + {% if IS_MUSICAL_EVENT() and not IS_LOCALHOST and not (SITE_NAME == 'WPD' and not v) and (not v or v.event_music) and not (hole and hole.name == 'music') and not (u and u.song) and not (IS_HOMOWEEN() and p and p.award_count("haunt", v)) and err != 406 %} {% set path = "assets/events/" ~ IS_EVENT() ~ "/music" %} {% set song = SITE_FULL ~ "/" ~ path ~ "/" ~ listdir('files/'~path)|seeded_random(id) ~ '?x=45' %}