Chrome Application Mode - Disabling Shortcuts - html

When attempting to use Chrome in application mode as a host for an HTML5 application, there seem to be some severe limitations.
For example, if the user hits CTRL+T it will open up a new Chrome browser window, and allow them to start typing in the address bar. Ditto for CTRL+W. This is disconcerting, as it directly contradicts the intention of application mode; to make a web page feel like a normal application (that's not in Chrome).
Is there some mechanism through which one may disable this functionality?
Alternatively, are there forks of the Chrome project which are better suited to wrapping-up HTML5 applications?

Chrome Kiosk mode seems a little more appropriate but still suffers the issue of allowing new tabs (although possibly handles them a little better than app mode).
Enable kiosk mode in a shortcut with shortcut format
"...\chrome.exe" --kiosk
Otherwise it may just be a case of manually disabling certain Ctrl + key events.
Eg disabling the save event Ctrl+S (in jQuery without hotkeys - I'm sure there are other methods for whatever your preferred JS lib is)
$(document).bind('keydown', function(e) {
if(e.ctrlKey && (e.which == 83)) {
e.preventDefault();
return false;
}
});

Related

How to disable Flash in Chrome?

I need to disable Flash for a test case where the user doesn't have Flash installed in Chrome.
Before updating, it worked fine with this option --disable-bundled-ppapi-flash.
But now it doesn't work.
How do I disable Flash?
Do the following on your Google Chrome, to disable Flash, or allow it for specific domains:
Option 1:
Navigate to chrome://settings/content and select the option you want in the Flash section.
Option 2:
Chrome Settings > Click Show advanced options... > Under Privacy click Content Settings... > See the Flash section.
There is an easy way.
Go to the url you want to block flash for
Click on icon "i" in front of the url
Change the flash to "Always block for this site"
I discovered something else that appears to disable Flash: Navigate to
chrome://flags/#prefer-html-over-flash
and set the flag that is highlighted (for "Prefer HTML over Flash") to "Enabled"
I have just done this and tested my computer on Do I Leak- and it reports that Flash is disabled
Sadly they removed interaction with plugins like that in chrome 57.
With web browsers being among the most frequently used pieces of
software out there, it's little wonder that there is so much concern
about security surrounding them. Browser plugins can be a major
security worry, and with Chrome 57 Google has taken the strange
decision to block users from disabling them or changing their
settings.
You can still get at the settings by navigating to: chrome://settings/content
Example:
Alternatively you can get there by visiting:
Chrome Settings > Show advanced options... > Content Settings > Flash

How to open an Incognito or Private Browser mode with AS3?

Is it possible to open a new browsing window in private browsing mode using AS3 for flash? I know by calling:
navigateToURL(new URLRequest("adobe.com", "_blank"));
but is there a way to do this so that the new window/tab that opens is using private mode?
You can't force a user to open the browser in private browsing mode.
This isn't just true for AS3/Flash, it's true across the board. Unless you're using code native to the browser (which you couldn't execute from AS3/JS), you can not do it.
This is, in part, because not all browser have private mode. Even those that do, have implemented it differently.
See the following questions:
New Chrome Incognito Window via HTML/JS
How to open new incognito window with Javascript? (Google Chrome)
It would appear it simply is not possible in Chrome without being done through an extension with a certain permission. Flash is quite a bit more locked down than JS, so it is very likely impossible. A quick Google search for "flash open incognito" shows no relevant results, too, so that also makes me believe what you want isn't possible. I would assume it is similar for other browsers as well, though I did not search to be sure.

Chrome settings - set "emulate touch events" as default settings

We are trying to run some automated tests (coded ui based) on our mobile application via Chrome browser.
In order to make the tests available to run, we must set the browser to work as 'emulate touch events'.
The thing is that as part of our test flow, a new chrome browser is being launched on each test but the definition is gone.
I already check this one, but it doesn't work:
How to Always Emulate Touch Events in Chrome Dev Tools?
Any other suggestions?
Thanks,
Yair
I believe that the dev tools window must be opened for the overrides to kick in, have you tried that?

Live preview / WYSIWYG support or plugin for Rubymine?

I'm using Rubymine 5.4 for Windows and it's overall amazing, and 95% as good as Visual Studio as an HTML / CSS Editor with a few exceptions... the main one being a lack of a live preview /WYSIWYG ability, i.e. as I type I can see the resulting preview live (in addition to VS, DreamWeaver also has this feature). I can't seem to find anything like it in the IDE, help, or any Google/Stack searches.
To be clear, what I am looking for is a way to have a split screen view in RubyMine where I can be editing my HTML / CSS in one pane/tab and be seeing the Live Preview of what it would look like in a browser in another tab/pane.
Ideally, this would be:
in RubyMine itself (using native panes/tabs as described above)
the user could configure whatever browser rendering engine (Chrome, FF, IE, etc...) they wanted to view the preview in...
...however, I could live with any variation of the two above, e.g. simply integrated with RubyMine using external windows/browsers, or maybe, the preview only available with limited rendering engines (only Chrome let's say).
Thanks to #CrazyCoder & #LazyOne for the pointers...
After a bit more research, I've confirmed and gotten more detail:
The solution is to use the Official Jetbrains (maker of RubyMine) LiveEdit plugin which you can find here: http://plugins.jetbrains.com/plugin/?id=7007
Detailed Instructions
Download the JetBrains LiveEdit plugin from here: http://plugins.jetbrains.com/plugin/?id=7007
Run Rubymine > Settings > Plugins (type "plugins" in the search
box in settings)
Click the Install Plugin from disk button at the bottom of the list
Navigate to where you downloaded the plugin and select/open it
Activate by checking it on the plugin list
(You will likely have to) restart RubyMine
Once restarted, go to the menubar > View > LiveEdit (which will then be checked)
Download the JetBrains IDE browser Extension for Chrome here: https://chrome.google.com/webstore/detail/jetbrains-ide-support/hmhgeddbohgjknpmjagkdomcpobmllji?utm_source=chrome-ntp-icon
The Chrome extension supports both WYSIWYG/real-time "LiveEdit" outside the IDE, in an external Chrome window and JavaScript debugging inside the actual RubyMine IDE
I believe there is also an extension for FireFox, which I believe ALSO DOES support
Javascript debugging through the IDE. BUt, I'm not sure if it supports LiveEdit like the Chrome extension
(Launch) Debug your project
Edit as you normally would
Observations/Opinions
The plugin pretty much works seamlessly. I've found it cuts development time significantly by not having to constantly MANUALLY reload the page, i.e. use your mouse or keyboard to bring focus to the browser window and hit refresh... this time adds up especially if you are doing a lot of HTML/CSS and want to check your changes often.
However, I'd suggest turning it off if you're going to do any major back-end/Rails or Javascript as the reload might be slightly longer due to code interpretation/processing and you hit errors as you are mid-statement and the LiveEdit decides to refresh while variables aren't defined or have improper values. In this case, the time you save by not having to manually refresh, may be lost (more than 1x fold) b/c of how often and how long it takes for content to be created/rendered on the server-side or in JS on the client.

How can I get notification of page load events in Chrome?

I need to be able to monitor navigation events (such as page loads or switching between active tabs) in browsers running on a Windows PC. So far, I can get this to work in IE and Firefox by loading a DLL into all running apps via a call to SetWindowsHookEx, then asking for either the IHTMLDocument2 (in IE) or nsIWebProgress (in Firefox) interface from the application. I can use the appropriate interface to request a callback from the application when an event of interest happens.
Is there a way to do this in Chrome? I have read a little about Chrome extensions, but I have not found any documentation on an API exposed by Chrome that is analogous to COM in IE or XPCOM in Firefox. Will a similar approach work or will I need to do something completely different? (I am working in C++.)
I would appreciate it if someone could at least point me in the right direction.
Thanks.
With Chrome extensions API you can register some events handlers for changing state of tab like when document state is changed (loading or loaded), when new tab is added/removed from window or when user switch between tabs.
More about tabs events You find on http://code.google.com/chrome/extensions/tabs.html#event-onActiveChanged