Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

js check tab active

let browser_active = ((typeof document.hasFocus != 'undefined' ? document.hasFocus() : 1) ? 1 : 0);
if (!browser_active) {
 // active
} 
Comment

javascript browser tab active

let browser_active = ((typeof document.hasFocus != 'undefined' ? document.hasFocus() : 1) ? 1 : 0);
        if (!browser_active) {
          this.title = 'Окно неактивно';
        } else {
          this.title = 'Окно активно';
        }
Comment

PREVIOUS NEXT
Code Example
Javascript :: immediate invoke function js 
Javascript :: bash commands in node 
Javascript :: factorial function javascript 
Javascript :: string repeat codewars javascript 
Javascript :: get id of first td jquery 
Javascript :: javascript for...of index 
Javascript :: what is the use of angularjs 
Javascript :: javascript decode uri 
Javascript :: free robux javascript 
Javascript :: react onclick div 
Javascript :: js get input from user 
Javascript :: how create an index mongodb 
Javascript :: javascript ES6 destructure dynamic property name 
Javascript :: vue js select option disabled false 
Javascript :: sample google map api key for testing 
Javascript :: nodejs json beautify 
Javascript :: how to check if a folder exist if not then create nodejs 
Javascript :: indexof vs findindex 
Javascript :: jquery select clear options 
Javascript :: array of refs react 
Javascript :: vue shortcut to create component 
Javascript :: get days in current month using moment.js 
Javascript :: javascript find string between two characters 
Javascript :: knex.js count 
Javascript :: yarn build react 
Javascript :: jquery textarea autosize 
Javascript :: array remove index from array 
Javascript :: react img not showing 
Javascript :: javascript sum array 
Javascript :: run from build react 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =