Currently, I have created a Chrome App that gets data from a serial connection using the Chrome App Serial API. My goal is to inject this data into a web page. I know this is capable with Chrome Extensions, but the issue there is that Chrome Extensions aren't capable of accessing the serial data on it's own. I also would like to use an Extension instead of an App because the Chrome Apps aren't going to be supported starting this year.
The only option I could think of is to use a Chrome App to get the serial data, send the data to an Extension, and then inject the data into a web page. This is definitely not preferable though. Besides the Chrome Apps not being supported, except for Chrome OS, I wouldn't like to have to have a user download the extension and the app just to implement this.
My preferred method would to have an Extension access the serial devices. Is this possible and/or is it going to possible in the future? If not, why?
Thanks in advance!
Related
I have a JavaScript app running in my desktop Chrome browser which is reading and writing to Firebase. I'd like to get a sense of how much traffic it uses (vs any local caching) and I figured I could just watch in the Chrome Inspector.
I'm not seeing any such traffic. I assume I need to tweak some Inspector setting, but it looks like I have everything turned on and nothing filtered.
How can I see this traffic? (For my current simple needs, I'd much rather do so in Chrome, and not have to fire up WireShark)
Firebase uses a websocket to communicate with clients. In the devtool's networking tab, filter by "WS" (websocket) and you should see the connection that Firebase is using.
There is a great extension for Chrome called 'GTM/GA Debug' that has a readout for Firebase hits. When using the extension in Chrome Dev Tools, look at the tab named GA4F (Google Analytics for Firebase). It is very helpful for debugging.
I had to develop a Chrome Extension for a website i'm working for. I finished developing it just fine. But Chrome automatically turns it off after browser restarts, with following reason:
This extension is not listed in the Chrome Web Store and may have been added without your knowledge.
My question: Is it possible to have a "Trusted" extension without publishing it to the Chrome Web Store. I don't want to publish it because it wouldn't make much sense, because it is for a very restricted number of "corporative" users.
The chrome web store allows you to hide your extension from public listings. It also allows you do inline installation. This would allows users to install the chrome extension in their browser without ever having to leave your website. So it would be hosted in the chrome web store, trusted, but only installable from your own website.
I'm trying to develop a Chrome App that will work together with a Chrome Extension that I already created, wherein the Chrome Extension will send information to the Chrome App.
For this communication I thought use the WebSocket locally, in Chrome Extension I managed to make the Client, but now I'm having difficulty in creating the Server in the Chrome App, because I wanted to make as simple as possible without having to install something beyond of the Chrome App.
Among the first Google results there is a sample app from Chrome team: Http WebSocket Server.
You've got to understand that making a server in Chrome Apps is difficult; you are given access to a raw socket, and you need to fully implement the protocol that a particular server must use. Even a HTTP server is non-trivial, WebSockets is even less so.
So: it's possible, but it's not simple unless you're using an existing library.
Just to add to the accepted answer:
There is a Chrome Extension already in the Chrome Web Store: Web Server for Chrome.
And it is opensource: GitHub Link. You can use it as a library to your Chrome App.
Cheers!
I've got a third party script that runs in many places on the web. I'd like to be able to tell when I'm running in an app vs. a browser. The user agent doesn't always help. Chrome provides the chrome object which has some different properties depending on the environment. Anyone know of anything similar for IE?
This is for a product similar to google analytics which can be implemented or wind up in many environments, and I'm trying to distinguish them better.
Check for window.external. If window.external is null then the web page is loaded into a Web Component, otherwise it is loaded via browser.
window.external enable you to communicate with [ComVisible(true)] instances which are enabled by default in the browsers. As long as your apps are not decorated with [ComVisible(true)], you can distinguish between app and browser page consumption.
Read more about window.external on http://msdn.microsoft.com/en-us/library/ie/ms535246%28v=vs.85%29.aspx
The way Google Analytics checks for browser and device is the HTTP User-Agent header. It lets you check for browser, browser version, OS, OS version, and sometimes device:
http://jonathanstark.com/blog/windows-phone-8-user-agent-string
http://msdn.microsoft.com/en-us/library/ms537503(v=vs.85).aspx
You can parse this string in Javascript as well:
Getting the User Agent with JavaScript
my application is setting browserhome page ,search provider ,favourites etc to all supported browsers like googlechrome,firefox,internet explorer.My purpose is to automate my application using selenium .In case of IE these informationa are stored in registry . so it is easy for me to validate the above details .But for firefox and google chrome its bit problem .So i just want know whether there is any functions available in javascript to check browser homepage ,search provider,favourites etc in firefox and google chrome ?
The simple answer is no. It would be a security and privacy issue if client side js code could access that information. Instead you would need to use a browser extension, or in your case you can just use an external program with administrative rights. I am pretty sure that selenium does not have this functionality built in, however it is all available if you know where the browser stores it. IE uses the registry, but chrome and Firefox use proprietary files in their profile directories. There may be an library that does this, otherwise it is possible