Force Chrome/Firefox into Full Screen? - javascript

I want to use chrome to display a full-screen html page for a presentation. You can set chrome to fullscreen mode, but it seems the only way to exit is moving the mouse to the top of the screen and clicking:
I don't want to disable the ability to exit full-screen, I just want to make it so the only way to exit is via pressing the ESC key, not the mouse position. That way basically browser "admin" are the only ones who can get out of the presentation. Is that possible in Firefox or Chrome? Could I write an extension for this if it's not possible?

Using my comment for an Answer:
Chrome implemented 'Kiosk Mode' in version 4.0.245.0. This is, essentially, a way to launch the browser in fullscreen mode with the Address Bar and Status Bar disabled. Some keyboard shortcuts (Fullscreen, for example) are also disabled.
On Windows: chrome.exe -kiosk http://yoursite.com/file.html
On everything else: chromium-browser --kiosk http://yoursite.com/file.html
Note: Use your 'exit program' keyboard combo to kill it.

For firefox, the add-on R-kiosk doea a similar job:
https://addons.mozilla.org/en-US/firefox/addon/r-kiosk/
I have used it before and it used to be pretty good for kiosk type applications. Haven't needed it in a while though.
To exit, you need to start firefox in safe mode and disable the add-on, which works very well for kiosk purposes.

Related

Activate touch events on Chrome 71+

I want to activate touch events on Chrome to facilitate the debugging of an app that uses touchstart and touchend events.
It seems this post is a bit outdated because I cannot get the Overrides menu when I go to the developer settings, not on Chrome nor on Chrome Developer. This is what I get on Chrome Dev 73:
I've searched thoroughly in the settings but no sight of this checkbox. I've seen no up-to-date tutorial to activate them. How can I do?
Thank you for your help.
Two methods in the devtools:
Press Escape to show the drawer at the bottom. Choose menu > Sensors. At the bottom, set Touch = Force enabled.
Turn on Device Toolbar (second button at the top). Choose menu > Add device type. Set it to either "Mobile" or "Desktop (touch)".
Both of these should enable touch events.
It should be a chrome flag. Type this address into the chrome URL bar:
chrome://flags/#touch-events
it should highlight the Touch Events API, after that just press the drop-down box and change it to enabled.

I need to make web-app work as windows full screen app. In IE-11 (last) for PC (WIN-7), full screen mode, with a button to close it

I need to make web-app work as windows full screen app.
In Microsoft Internet Explorer - 11 (last) for PC (Windows-7), full screen mode, with a button to close it.
.
The first task is a fullscreen mode.
I can make fullscreen easily (Thanks to another question here)
window.open ("mapage.html","","fullscreen=yes");
window.open('','_parent','');
window.close();
It work perfectly but only for "localhost", once I put files to the server the 'fullscreen' appears to be not fully fullscreen, but it also shows window header with /close/ and /minimize/ buttons and the /address bar/. And it reveals IE.
.
The second task is a button to close it.
Luckily IE window may be closed with simple
window.close();
But IE asks approval and it reveals itself. I find a way to bypass it with the code from above that I use to make IE work in fullscreen. Unfortunately, I cannot use this fullscreen solution. So If there would be another, please, take to account that I would need the close button for all application.
Ok, this is what I came up with:
Option 1
Use something to run Internet Explorer in kiosk mode.
like a .bat file
"%ProgramFiles%\Internet Explorer\iexplore.exe" -k "http://google.com/"
or Delphi (to have an .exe file):
var filename, parameters: string;
begin
filename := '"iexplore.exe"';
parameters := ' -k "http://google.com/"';
ShellExecute(handle,'open',PAnsiChar(filename), PAnsiChar(parameters), nil , SW_MAXIMIZE);
end;
Option 2
Use Delphi with EmbeddedWB component.
EmbeddedWB1.Navigate('http://google.com/');
One string of code and I have my own browser with or without address panel.

JS function cancelFullScreen don't work after pressing F11. Is it possible to fix it?

This is source code for exit from fullscreen mode:
var cancelFullScreen = document.webkitCancelFullScreen || document.mozCancelFullScreen;
cancelFullScreen.call(document);
it's works correctly when i enter fullscreen using function startFullScreen, but don't work after pressing F11 key - browser won't exit fullscreen mode. Browsers Chrome 18 and Firefox 12. Why it's happens? Is it bug, security restriction or some other? Is it possible to fix it?
F11 and requestFullScreen are the different things in browsers. requestFullScreen requires permissions from users while pressing F11 is not.
Also as you may see they have different interface. For example opening window in fullscreen mode (using JS) in Google Chrome don't tell user that he can go out pressing F11 while native fullscreen do.
Your example makes no sense, because you can only request full screen on an element, not on a document. The API also requires you to cancel full screen on the element on which you requested full screen. The Gecko API also tells you the element that it thinks is in full screen mode, i.e. the one that you need to cancel full screen on. If you press F11 to enter full screen, this element remains null, because you cannot cancel it.

Set keyboard to stay open even on "go" press with html5/javascript?

I'm building a small html5 web-app to hone my html5 skills. I've built the project and it works pretty good, but I want to enable some mobile functionality which should make it even cooler! One of the annoyances of using the site on mobile is that whenever you press the "go" button on the android keyboard after entering data into a textbox, it hides its self, despite the fact that in javascript I've specified that the textbox still has focus. Is there a way to explicitly tell the android browser to keep the keyboard open?
Thanks,
John
I think this is beyond the realms of JS - The keyboard is part of android, and thus (I assume) would be up to the browser to decide whether the keyboard stays or not - how would you cope for different browsers running across android?
Because I would assume they're not all running Webkit (Firefox mobile?).
So I think the answer is it can't be done :(

Disable IE9 Javascript debugger when using Visual Studio 2010

Is there a way to disable javascript debugging when using Visual Studio with IE9?
If you click the Tools (Alt+X) button, then click the Internet Options menu item.
In the Advanced Tab, and in the Browsing category:
Check Disable script debugging (Internet Explorer)
This should disable the Javascript debugger
I tried the solution provided by Dotmister, but it didn't work on my Vista (x64), VS2010 and IE9.
However I tried the following and it worked (source: http://www.visualstudiotutor.com/2011/02/disable-stopjavascript-debugging-in-visual-studio/)
Open the application Property page and select the Web tab
Select “Start External Program” and set the path to iexplorer.exe
Enter the URL in the Command line argument option
Hit F5 to commence debugging.
My debugger was very slow when I hit a breakpoint, partly because I had the Edit and Continue enabled (you can disable it in VS under Tools -> Options -> Debuggins -> Edit and Continue) and partly because I could not disable JavaScript debugging.
Now it is significantly faster.
You can also disable all script debugging in VS via:
reg add HKLM\SOFTWARE\Microsoft\VisualStudio\9.0\AD7Metrics\Engine{F200A7E7-DEA5-11D0-B854-00A0244A1DE2} /v ProgramProvider /d {4FF9DEF4-8922-4D02-9379-3FFA64D1D639} /f
Right click the web application and choose Properties Click Web tab
on the left and choose “Don’t open page” radio button on the left
panel Start Debugging (press F5)
Open Internet Explorer and navigate the URL. { I just pinned that instance of IE to my taskbar ;-) }
If the disable checkboxes in IE doesn't work for youm then in VS go to
Tools > Options > Debugging > Just-In-Time > Uncheck Script Option.
This worked for me.

Categories