code cleanup
This commit is contained in:
		@ -34,20 +34,12 @@ function assurePlaybackState(play) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function useHttp() {
 | 
					 | 
				
			||||||
    return !window.location.href.includes('https://');
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
function getYoutubeHost(config) {
 | 
					function getYoutubeHost(config) {
 | 
				
			||||||
    let host;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (config.noCookie) {
 | 
					    if (config.noCookie) {
 | 
				
			||||||
        host = 'https://www.youtube-nocookie.com';
 | 
					        return 'https://www.youtube-nocookie.com';
 | 
				
			||||||
    } else {
 | 
					 | 
				
			||||||
        host = useHttp() ? 'http://www.youtube.com' : undefined;
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return host;
 | 
					    return `${window.location.protocol}//www.youtube.com`;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const youtube = {
 | 
					const youtube = {
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user