0

I've seen other questions asking the same thing, with answers that were accepted. However, those answers don't always work.

This was the accepted answer:

if (screen.availHeight || screen.height-30) <= window.innerHeight) {
    // code
}

And yes, that works, but not if the users zooms in on the page. I run a website in kiosk mode (not a Chrome app) on 2 public PCs in an apartment complex for elderly people.

I need to detect users coming from those two PCs to add some extra code seeing as everything would mess up if they click a link going to a different website or click a link to a PDF file. There's no tabs so there would be no way to get back to the original website so I inject code to open external links in an iframe.

How can I detect users coming from those PCs with just a normal Chrome installation? An extension that could do the trick would also be welcome.

s1h4d0w
  • 762
  • 6
  • 27
  • If an answer does not work and you have the same question, post a comment explaining why it does not work, and downvote it. – phihag Jun 01 '17 at 10:34
  • 1
    Possible duplicate of [Detect Google Chome in Kiosk Mode](https://stackoverflow.com/questions/18666522/detect-google-chome-in-kiosk-mode) – phihag Jun 01 '17 at 10:35
  • The question you linked is regarding a Chrome app, I mentioned I'm not in a Chrome app. – s1h4d0w Jun 01 '17 at 10:41
  • Why do you think that [the question](https://stackoverflow.com/questions/18666522/detect-google-chome-in-kiosk-mode) is regarding a Chrome app? It's not even tagged [google-chrome-app](https://stackoverflow.com/questions/tagged/google-chrome-app)! – phihag Jun 01 '17 at 11:10
  • Did you even read the answer of the question you linked? It says: "The above answer assumes that you are in a Chrome app." I am not in a Chrome app, I'm just in the Chrome browser with --kiosk added to the startup parameters. Those are two very different things. – s1h4d0w Jun 01 '17 at 12:18
  • That is the *answer*, not the *question*. Also note the current answer there goes on to describe one option to `detect whether a page is in a Chrome browser launched with the --kiosk option`. – phihag Jun 01 '17 at 14:08

0 Answers0