can a google chrome extension flash an OS style alert? - google-chrome

for example, growl flashes a message in the upper right corner regardless of which application is running. Skype makes the icon in the dock have a little red dot with a number of new messages. Is there anyway to write a chrome extension to have this type of functionality? that is, I want to write a chat system that works in the browser but also notifies users when they have closed my site's tab, or even when chrome is not running.
I could write a native client in addition to my browser based client, but that's double the work. (Tripple the work if you bother with a native window's client vs. just OSX but who would do that?)

Chrome can create "Desktop Notifications" See the Documentation
It's also possible to have the notifications visible when chrome is closed providing you create a "background process". this question/answer might point you in the right direction.

Chrome supports the text-only version of the W3C desktop notification standard. Chrome deprecated the HTML version about a year ago and will stop supporting it very soon. Any webpage viewed in Chrome and any Chrome extension can use this API.
The Rich Notifications API is available to Chrome extensions and packaged apps. As of today, it's dev-channel only and is iterating rapidly. It has implementations on ChromeOS and Windows, with Mac on the way. Linux currently delegates to the W3C implementation. The API is not a 1:1 replacement of W3C HTML desktop notifications, but it does provide many layout options for common use cases.

Related

Custom Firefox / Chromium install with Pre-installed extension (non enterprise)

i wanted to build a custom browser install that would fit the following specs, i found ways to do it using enterprise deployement, but my intent is to distribute it to friends and family without having to go through the enterprise distribution.
Can be sourced from Firefox or Chromium (or even other as webkit)
Should be easy to customize (ideally no C++ coding)
Should be able to embed extension or hard code the extension within the browser. (i've coded a custom adblock that is lighter and faster than the ones on FF or Chrome store and would also like to embed TOR connection extension)
Remove the ability to install other extensions (i want to ensure this browser cannot be victim of bloatware extensions installs)
Customize UI
Protect the browser against Search engine / HP / New tab settings change.
If you could point me to the right direction it would be awesome and i'll make sure to share this browser's link here once done.
I just saw this in the corner of my eye and figured I'd share this question/answer to possibly help you:
Standard way to build a Chrome extension into Chromium

Displaying Emoji in Google Chrome

I have a Google Chrome Extension that supports chat. The chrome extension displays the messages sent to you in desktop notification. I have noticed that whenever I send an emoji from an iPhone, it correctly displays in the Desktop notification. But when I try to display the same emoji in the actual application (it's an iframe injected into the page), it appears as a square.
Seems like there's an open bug at https://code.google.com/p/chromium/issues/detail?id=62435.
I was wondering why it works correctly in Desktop Notification and not otherwise? Also, is there anything I can do to fix it?
I just implemented Emoji support in my extension using the open-source Twemoji library.
In the simplest form, it involves adding a .js file and calling a function on a DOM element to replace Unicode emoji with Twitter CDN provided images:
twemoji.parse(node);
See the repository readme for more options.
Chrome will now support emojis natively (only OSX). You can wait a few weeks until the stable version is released with this feature, or you can download the dev-version form here, that already contains this feature.
Btw, if you want to test if it works, you can use this page (works like a charm).
You can view emoji with a Chrome extension called Chromoji.
It works on Mac OS X, Windows and Linux as well.
Solved by adding Emojis - Emoji Keyboard extension to Chrome.
Additionally, I checked that the Chromoji - Emojis for Google Chrome extension also works.
1st Note: Emojis appear everywhere on the page except for inputs and textarea.
2nd Note: Any of these extensions additionally give us the ability to search for emojis along with the possibility of copying them.
I saw this problem could be solved by updating Internet Explorer to version 11 under Windows 7 x64 (several computers affected, all solved).
In my case, it was because I formatted the pc with pure, no-servicepacked Windows 7 x64. After SP1 on Windows 7 and IE11 have installed, all browsers started to show the emojis correctely. I used for test this site.
If the page shows squares all around the page, the error is not solved. If the page shows several kinds of symbols, than the error is eliminated.
Please tell us if this workaround was effective.

Debug Ipad web app on Windows

I've got site that is correctly displayed on desktop version but has few bugs on iPad. What's the simplest way to detect problems if my OS is Windows?
Option 1 - Free, local machine debugging
You may use Safari browser for Windows (download Safari 5.1.7).
Steps
Enabling Develop menu in menu bar (Press 'Alt' key to open menu bar. Then follow to Edit menu > Preferences > Advanced tab. Find this option at the bottom.)
Then, follow through Develop menu > User Agent. Select iPad, iPhone etc.
There are more options in the Develop menu (e.g. Show Web Inspector) to help with your JavaScript etc debugging.
Credits to How to debug iPhone and iPad web applications, using Safari.
Option 2 - Paid, browser-based access to target browser/OS/machine
I've personally used http://www.browserstack.com/ and it lets you test the functionality on a wide combination. However debugging may not be as convenient here as it would be on a local machine.
There may be more companies providing similar services.
Beware of basic online emulators
As mentioned in a comment, be wary of 'emulator' websites. Example: A website I ran into claimed to emulate iPhone, with a picture of iPhone, and inside it was an iframe, being dutifully rendered by the browser I opened that website in (Firefox).
The best way I can think of(depending of your implementation) is to use the firefox plugin
https://addons.mozilla.org/en-US/firefox/addon/user-agent-switcher/
It allows you to switch to all sort of devices and see how they would appear on another device.
Here http://www.ampercent.com/test-website-design-iphone-ipad-mobile-devices/7075/ is a quick guide on getting you started.
There are also user-agent switchers for other browsers than FF like Chrome. Do a google search and try for yourself which one you like.

Does mobile Google Chrome support browser extensions?

Can I create a plugin or an extension for Google Chrome MOBILE (Android Google Chrome)?
If not, can I create an extension for Google Chrome (desktop), which will add a button in Google Chrome bar. This button will open the page in another web browser (in my own web browser), so, this button should launch my own web browser.
Extensions are not supported, see: https://developers.google.com/chrome/mobile/docs/faq .
Specifically:
Does Chrome for Android now support the embedded WebView for a hybrid native/web app?
A Chrome-based WebView is included in Android 4.4 (KitKat) and later. See the WebView overview for details.
Does Chrome for Android support apps and extensions?
Chrome apps and extensions are currently not supported on Chrome for
Android. We have no plans to announce at this time.
Can I write and deploy web apps on Chrome for Android?
Though Chrome apps are not currently supported, we would love to see great interactive web sites accessible by URL.
You can use bookmarklets (javascript code in a bookmark) - this also means they sync across devices.
I have loads - I prefix the name with zzz, so they are eazy to type in to the address bar and show in drop down predictions.
To get them to operate on a page you need to go to the page and then in the address bar type the bookmarklet name - this will cause the bookmarklet to execute in the context of the page.
edit
Just to highlight - for this to work, the bookmarklet name must be typed into the address bar while the page you want to operate in is being displayed - if you go off to select the bookmarklet in some other way the page context gets lost, and the bookmarklet operates on a new empty page.
I use
zzzpocket - send to pocket.
zzztwitter tweet this page
zzzmail email this page
zzzpressthis send this page to wordpress
zzztrello send this page to trello
and more...
and it works in chrome whatever platform I am currently logged on to.
Some extensions like blocksite use the accessibility service API to deploy extension like features to Chrome on Android. Might be worth a look through the play store. Otherwise, Firefox is your best bet, though many extensions don't work on mobile for some reason.
https://play.google.com/store/apps/details?id=co.blocksite&hl=en_US
Just use a different browser.
Follow the steps given below to install Chrome extensions on your Android device.
Step 1: Open Google Play Store and download Yandex Browser. Install the browser on your phone.
Step 2: In the URL box of your new browser, open 'chrome.google.com/webstore’ by entering the same in the URL address.
Step 3: Look for the Chrome extension that you want and once you have it, tap on 'Add to Chrome.’
The added Chrome extension will now be automatically added to the Yandex browser.
I imagine that there are not many browsers supporting extension. Indeed, I have been interested in this question for the last year and I only found Dolphin supporting add-ons and other cool features announced few days ago. I want to test it soon.

Difference between Chrome Apps and Extensions

What is the difference between Chrome Apps and Extensions?
What can you do with apps that you can't do with extensions or vice versa?
Quoting from https://developer.chrome.com/webstore/apps_vs_extensions:
We’ve already had the concept of “web apps” in the browser for a few years, as something more rich and interactive than a website, but less cumbersome and monolithic than a desktop application. Examples include games, photo editors, and video players; all of these categories are viable as tightly focused apps running inside the browser. Google Chrome is just formalizing the web app concept in a way that will be familiar to anyone who’s used apps on a smartphone.
Extensions ... extend the functionality of Google Chrome and the websites being viewed in it. For example, they can extend Google Chrome by adding a new button to the address bar, such as an ever-present currency converter. Buttons like this can also apply to the current website being viewed—for example, click the currency converter button to convert all prices on the website you’re viewing. Similarly, you can introduce new items to the context menu, change the behavior of the omnibox (the input field on the address bar), access the user’s browsing history (with consent), and much more. You can alter web pages too—for example, embed a “mail this” button next to every link in every page, or customize the layout of your favorite website.
Compared to apps, extensions cut across websites and web apps; they are usually in effect across all websites (though some are site-specific). Apps don’t combine with other apps in this way; they run standalone, like any regular website.
(emphasis added)
From what I can tell, Chrome apps are just web applications that are registered with Chrome's Web Store (Gmail, e.g.). They're basically just glorified bookmarks. Google seems to have introduced them in order to make their browser more "operating system"-like, in preparation for tablets running Chrome OS. Since Chrome OS won't have any native applications apart from Chrome, they need some way for you to be able to "install" applications... even if those applications are just websites.
Extensions can actually affect the way that the browser behaves (ad blocking, e.g.). They can add buttons to Chrome's toolbars, intercept web requests, change the DOM, etc.
Here is an excellent resource from the Google Chrome team explaining the differences in detail.
It also contains a decision tree flow chart shown below.
Please refer to the following link:
(chrome app vs extension).
It basically says that there are two kinds of apps: hosted and packaged. Hosted apps are glorified bookmarks. But packaged apps provide you with a somewhat best of both worlds features- of both extensions and apps.
Extensions of course extend the core browser functionality providing little or no additional UI apart from what is already provided by chrome.
There are three Chrome distribution channels for developers.
In order of increasing functionality they are:
Chrome extensions — little to no UI
Chrome hosted apps
Chrome packaged apps
More information and fuller discussion is contained in this video.
quoting from http://www.chromeplugins.org/extensions/chrome-web-apps-extensions-spot-the-difference/
(as the explanation is very good)
Major Differences Between Chrome Extension and Chrome Web Apps
One of the major differences between Chrome extensions and web
applications is their location. Majority of the Chrome extensions can
be downloaded from Chrome Extensions Gallery whereas Chrome Web Apps
can be installed from Chrome Web Store.
Another major difference between Chrome extensions and web apps is the
fact that while extensions are used to enhance the functionality of
the Chrome Browser, web apps run within the browser having a different
user interface. Unlike web applications, extensions have little or
sometimes no UI component.
From a technical perspective the major difference between Chrome Apps
and extensions is the presence of “launch” parameter in apps which
indicates Chrome to show when user starts an application installed by
him/her.