Let’s do a gimmicky little bit of JavaScript that will censor a website if the focus is lost. For this what we will make happen is to cover the screen in black if it loses focus. Losing focus could happen when another app is opened, causing the web browser to be in the background or simply when switching to another browser tab.
For this example we are going to cover the page from view, but you could use…