Show close option in Google Chrome kiosk mode / view

亡梦爱人 提交于 2021-02-07 09:53:42

问题


I have launched google chrome in kiosk mode from my windows desktop application

using

chrome.exe –kiosk http://www.my.url.com

I want to show the CLOSE option/button in kiosk mode.

Note that I do not have keyboard available to exit.

any help is appreciated.


回答1:


Since it's Chrome, you can simply use Javascript:

<a href="javascript: window.close()">Close</a>



回答2:


Use the Close Kiosk Chrome extension located here: https://chrome.google.com/webstore/detail/close-kiosk/dfbjahmenldfpkokepmfmkjkhdjelmkb?hl=en

This does not actually show the close button, but it allows you to close it from within your code.

After you install the extension and when the application is running in kiosk mode inside Chrome, your JavaScript code should change the location URL as follows:

document.location.href = "http://closekiosk";

This is a trigger to the extension to close kiosk mode.



来源:https://stackoverflow.com/questions/29003213/show-close-option-in-google-chrome-kiosk-mode-view

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!