Skip to content

Commit

Permalink
Quick fix for non-spoiler dweets to be played as before
Browse files Browse the repository at this point in the history
This makes sure the dweets that are not tagged as spoiler will not have
the curtain visible
  • Loading branch information
lionleaf committed Dec 5, 2021
1 parent 34d9387 commit 502869a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dwitter/templates/dweet/dweet.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
display: inline-flex;
align-items: center;
justify-content: center;
visibility: hidden;
}

#spoiler-text {
Expand All @@ -33,7 +34,8 @@

</style>
<script>
var spoiler = getURLParameter('spoiler');
var spoiler = !!getURLParameter('spoiler');

var autoplay = spoiler ? null : getURLParameter('autoplay');
const urlDweetSrc = getURLParameter('code');
var lastError = "";
Expand Down Expand Up @@ -224,6 +226,10 @@

<script>

if(spoiler){
var curtain = document.getElementById('curtain');
curtain.style.visibility = 'visible';
}
function openSesame() {
var curtain = document.getElementById('curtain');
curtain.style.visibility = 'hidden';
Expand Down

0 comments on commit 502869a

Please sign in to comment.