Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript browser tab active

let browser_active = ((typeof document.hasFocus != 'undefined' ? document.hasFocus() : 1) ? 1 : 0);
        if (!browser_active) {
          this.title = 'Окно неактивно';
        } else {
          this.title = 'Окно активно';
        }
 
PREVIOUS NEXT
Tagged: #javascript #browser #tab #active
ADD COMMENT
Topic
Name
8+9 =