Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

js browser tab inactive check

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 :: scss next js 
Javascript :: javascript print 
Javascript :: save canvas as image from website 
Javascript :: javascript redirect to url with parameters 
Javascript :: ifsc code yup validation 
Javascript :: js arithmetic operators 
Javascript :: forjs check if key in json 
Javascript :: jsx classname multiple 
Javascript :: flutter build runner json serializable 
Javascript :: @tippyjs/react 
Javascript :: how to implement redis pub sub model using nodejs 
Javascript :: supertest multipart/form-data 
Javascript :: node promisify without err 
Javascript :: return last two values of array in javascript 
Javascript :: set timeout JS for loop 
Javascript :: js pad array 
Javascript :: electron send message from renderer to main 
Javascript :: how to change background color though props 
Javascript :: forming an object with reduce 
Javascript :: how to clear state in react hooks 
Javascript :: javascript encode base64 
Javascript :: js list pf objects 
Javascript :: passing html vlaues to Javascript function 
Javascript :: change class Name in react 
Javascript :: regex remove spaces 
Javascript :: jquery is element hidden 
Javascript :: how find empty object in js 
Javascript :: angular ng default scss 
Javascript :: for loop set timeout 
Javascript :: tolocalestring javascript currency fixing 2 decimal places 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =