1/* eslint-disable */ 2// event listeners 3let errorEncountered = false; 4let headerButton = null; 5let headerSongInformation = null; 6 7document.addEventListener('turbolinks:load', yall); 8 9document.addEventListener('BeforeSpaRender', function() { 10 headerButton = document.getElementById('header-play').innerHTML; 11 headerSongInformation = document.querySelector('.header-song-info').innerHTML; 12}); 13 14function showHiddenPlayerElements() { 15 const playerContainer = document.getElementById('persistent-player'); 16 if (playerContainer) { 17 const hiddenPlayerComponents = document.querySelectorAll('.pp-show-on-load'); 18 console.log({ hiddenPlayerComponents }); 19 for (let i = 0; i < hiddenPlayerComponents.length; ++i) { 20 hiddenPlayerComponents[i].classList.remove('hidden'); 21 hiddenPlayerComponents[i].classList.remove('pp-show-on-load'); 22 } 23 document.getElementById('header-play').innerHTML = headerButton; 24 document.querySelector('.header-song-info').innerHTML = headerSongInformation; 25 window.persistentPlayer.headerPPButton(); 26 } 27} 28 29document.addEventListener('load', function () { 30 showHiddenPlayerElements(); 31}); 32 33document.addEventListener('AfterSpaRender', function() { 34 showHiddenPlayerElements(); 35}); 36 37document.addEventListener('AfterSpaRender', function() { 38 if (/(\?|&)expand-player(=|&|#|$)/.test(window.location.search)) window.fireEvent('ExpandPlayer'); 39}); 40/* eslint-enable */
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.