This question has the potential to sound like malicious code but please be assured this is for personal development. If an answer to this could be used maliciously then I'll consider taking this down.
I am currently writing sites that are to be run offline for internal use. They make use of Chrome and I use --allow-file-access-from-files on the start up to use AJAX to determine the content to show. I'm creating offline full screen apps in kiosk mode.
As our IT policies make using Chrome a headache our internal customers are sometimes using their own browsers to open the index.html, which is fine. In this case I would like the code to catch the "Cant access local files" error and default to my array of predefined addresses.
How do i detect this error? How do I suppress it in the console menu? How do I then run a separate function which will call my array loader?