mirror of
				https://github.com/TitanEmbeds/Titan.git
				synced 2025-11-04 07:47:10 +01:00 
			
		
		
		
	Force focus with query param to show focus message
This commit is contained in:
		@@ -152,16 +152,20 @@
 | 
			
		||||
            $("#theme-selector option[value=" + theme + "]").attr('selected', 'selected');
 | 
			
		||||
            $('select').material_select();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (document.hasFocus()) {
 | 
			
		||||
            primeEmbed();
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        $(window).focus(function() {
 | 
			
		||||
            if (!has_already_been_focused) {
 | 
			
		||||
        if (getParameterByName("forcefocus") == "1") {
 | 
			
		||||
            if (document.hasFocus()) {
 | 
			
		||||
                primeEmbed();
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
            
 | 
			
		||||
            $(window).focus(function() {
 | 
			
		||||
                if (!has_already_been_focused) {
 | 
			
		||||
                    primeEmbed();
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
        } else {
 | 
			
		||||
            primeEmbed();
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
    
 | 
			
		||||
    function changeTheme(theme) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user