dont play music in twitter posts

pull/216/head
Aevann 2023-10-14 01:30:49 +03:00
parent 5e8278f5b2
commit 1e101a7b10
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
<link rel="stylesheet" href="{{'events/homoween/css/haunted.css' | asset}}">
<script defer src="{{'events/homoween/js/haunted.js' | asset}}" defer></script>
<div id="haunted-effect" class="fixed-top"></div>
{% if (not v or v.event_music) and not (hole and hole.name == 'music') %}
{% if (not v or v.event_music) and not (hole and hole.name == 'music') and not (p.embed and p.domain == 'twitter.com') %}
<audio id="thunder1" hidden preload="none" src="/assets/events/homoween/audio/haunted/thunder1.mp3"></audio>
<audio id="thunder2" hidden preload="none" src="/assets/events/homoween/audio/haunted/thunder1.mp3"></audio>
{% endif %}

View File

@ -1,4 +1,4 @@
{% if 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)) %}
{% if 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 == 'twitter.com') %}
{% set path = "assets/events/" ~ IS_EVENT() ~ "/music" %}
{% set song = SITE_FULL ~ "/" ~ path ~ "/" ~ listdir('files/'~path)|random() ~ '?x=45' %}
<audio id="event-song" hidden preload="none" src="{{song}}" loop></audio>