@@ -40,7 +40,7 @@ function getDomElements() {
4040 // The div containing all other elements
4141 randomYoutubeVideo : document . getElementById ( "randomYoutubeVideo" ) ,
4242 // Shows the percentage of videos that have been fetched
43- fetchPercentageNotice : document . getElementById ( "fetchPercentageNotice " ) ,
43+ fetchPercentageNoticeShufflingPage : document . getElementById ( "fetchPercentageNoticeShufflingPage " ) ,
4444 // The text that is displayed when an error has occurred
4545 shuffleErrorText : document . getElementById ( "shuffleErrorText" ) ,
4646 // Div containing all elements that should only be displayed if we are still shuffling
@@ -76,11 +76,11 @@ async function setDomElemenEventListeners(domElements) {
7676async function shuffleButtonClicked ( ) {
7777 try {
7878 domElements . shufflingFromChannelHeading . innerText = configSync . currentChannelName ;
79- const shuffleButtonTextElement = domElements . fetchPercentageNotice ;
79+ const shuffleButtonTextElement = domElements . fetchPercentageNoticeShufflingPage ;
8080
8181 setDOMTextWithDelay ( shuffleButtonTextElement , "Applying filters..." , 4000 , ( ) => { return ( ( shuffleButtonTextElement . innerText === "Please wait..." || shuffleButtonTextElement . innerText === "Fetching: 100%" ) ) ; } ) ;
8282 setDOMTextWithDelay ( shuffleButtonTextElement , "Should be done soon..." , 8000 , ( ) => { return ( shuffleButtonTextElement . innerText === "Applying filters..." || shuffleButtonTextElement . innerText === "Fetching: 100%" ) ; } ) ;
83-
83+
8484 if ( configSync . shuffleIgnoreShortsOption != "1" ) {
8585 setDOMTextWithDelay ( shuffleButtonTextElement , "Sorting shorts..." , 12000 , ( ) => { return ( ( shuffleButtonTextElement . innerText === "Should be done soon..." || shuffleButtonTextElement . innerText === "Fetching: 100%" ) ) ; } ) ;
8686 if ( configSync . shuffleIgnoreShortsOption == "2" ) {
@@ -93,6 +93,7 @@ async function shuffleButtonClicked() {
9393 setDOMTextWithDelay ( shuffleButtonTextElement , "Still shuffling..." , 20000 , ( ) => { return ( ( shuffleButtonTextElement . innerText === "Should be done soon..." || shuffleButtonTextElement . innerText === "Fetching: 100%" ) ) ; } ) ;
9494 }
9595
96+ // await delay(100000);
9697 await chooseRandomVideo ( configSync . currentChannelId , true , shuffleButtonTextElement ) ;
9798
9899 // Focus this tab when the shuffle completes
@@ -125,7 +126,7 @@ async function shuffleButtonClicked() {
125126 const errorMessage = `${ error . message ?? "" } ${ error . reason ? "\n" + error . reason : "" } ${ error . solveHint ? "\n" + error . solveHint : "" } ${ error . showTrace !== false ? "\n\n" + error . stack : "" } ` ;
126127
127128 // Immediately display the error
128- domElements . fetchPercentageNotice . innerText = errorHeading ;
129+ domElements . fetchPercentageNoticeShufflingPage . innerText = errorHeading ;
129130 domElements . shuffleErrorText . innerText = errorMessage ;
130131 domElements . shuffleErrorText . classList . remove ( "hidden" ) ;
131132
0 commit comments