Template:Home/NowPlaying2: Difference between revisions

Template page
No edit summary
Tag: Manual revert
No edit summary
Line 15: Line 15:
<script>
<script>
var videoIdList = [
var videoIdList = [
</html>
{{#for_external_table:
{{#for_external_table:
"{{{video_id2}}}",
"{{{video_id2}}}",
}}
}}
];
];
<html>
var shuffledList = videoIdList.sort(() => Math.random() - 0.5);
var shuffledList = videoIdList.sort(() => Math.random() - 0.5);
var button = document.querySelector("#ytButton");
var button = document.querySelector("#ytButton");
Line 27: Line 29:
   var justPlayedVideo = shuffledList.shift();
   var justPlayedVideo = shuffledList.shift();
   shuffledList.push(justPlayedVideo);
   shuffledList.push(justPlayedVideo);
  player.src = shuffledList[0];


  player.src = shuffledList[0];
}
}



Revision as of 23:37, 3 August 2023

Now Playing