mirror of
				https://github.com/iv-org/invidious.git
				synced 2025-11-03 21:58:29 -06:00 
			
		
		
		
	instead of a single infobox only for welcome, allow multiple infoboxes to be dismissed independently of each other. it'd be best to use a hash or array for storing these values, but then the state does not clear properly between sessions.
		
			
				
	
	
		
			20 lines
		
	
	
		
			567 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			567 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
var dismiss_welcome = document.getElementById('dismiss_welcome');
 | 
						|
dismiss_welcome.href = 'javascript:void(0);';
 | 
						|
 | 
						|
dismiss_welcome.addEventListener('click', function () {
 | 
						|
    var url = '/dismiss_info?name=welcome&redirect=false';
 | 
						|
    var xhr = new XMLHttpRequest();
 | 
						|
    xhr.responseType = 'json';
 | 
						|
    xhr.timeout = 10000;
 | 
						|
    xhr.open('GET', url, true);
 | 
						|
 | 
						|
    hide_welcome();
 | 
						|
 | 
						|
    xhr.send();
 | 
						|
});
 | 
						|
 | 
						|
function hide_welcome (bool) {
 | 
						|
    document.getElementById('feed-menu').classList.remove('hidden');
 | 
						|
    document.getElementById('welcome-outer').classList.add('hidden');
 | 
						|
}
 |