diff options
Diffstat (limited to 'docs/kiosk_mode.md')
-rw-r--r-- | docs/kiosk_mode.md | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/docs/kiosk_mode.md b/docs/kiosk_mode.md index 55bc39c..3c17898 100644 --- a/docs/kiosk_mode.md +++ b/docs/kiosk_mode.md @@ -1,7 +1,7 @@ -## Introduction - -If you have a real world kiosk application that you want to run on Google Chrome, then below are the steps to take to simulate kiosk mode. +# Kiosk Mode +If you have a real world kiosk application that you want to run on Google +Chrome, then below are the steps to take to simulate kiosk mode. ## Steps to Simulate Kiosk Mode @@ -9,7 +9,7 @@ If you have a real world kiosk application that you want to run on Google Chrome Compile the following Java code: -``` +```java import java.awt.*; import java.applet.*; import java.security.*; @@ -21,9 +21,9 @@ public class FullScreen extends Applet { AccessController.doPrivileged ( - new PrivilegedAction() + new PrivilegedAction() { - public Object run() + public Object run() { try { @@ -46,8 +46,11 @@ public class FullScreen extends Applet Include it in an applet on your kiosk application's home page: -``` -<applet name="appletFullScreen" code="FullScreen.class" width="1" height="1"></applet> +```html +<applet name="appletFullScreen" + code="FullScreen.class" + width="1" + height="1"></applet> ``` ### Step 3 @@ -56,16 +59,17 @@ Add the following to the kiosk computer's java.policy file: ``` grant codeBase "http://yourservername/*" -{ +{ permission java.security.AllPermission; }; ``` ### Step 4 -Include the following JavaScript and assign the doLoad function to the onload event: +Include the following JavaScript and assign the `doLoad` function to the +`onload` event: -``` +```javascript var _appletFullScreen; function doLoad() @@ -78,8 +82,9 @@ function doFullScreen() { if (_appletFullScreen && _appletFullScreen.fullScreen) { -// Add an if statement to check whether document.body.clientHeight is not indicative of full screen mode + // Add an if statement to check whether document.body.clientHeight is not + // indicative of full screen mode _appletFullScreen.fullScreen(); } } -```
\ No newline at end of file +``` |