GCM native permission prompt - can it be replaced or adjusted? - google-chrome

Does anyone know if the GCM native notification prompt you see on Browsers such as Chrome, can be replaced or adjusted in any way so that we show a more presentable popup instead?
Here is a native prompt example:

No, you cannot customize it.
The only option would be do draw your custom dialog with HTML / CSS, then when someone clicks subscribe display the default browser dialog: I've already seen it on some websites, but I strongly recommend against it (because of the bad UX it provides).

Related

Chrome Extension installation popup

When an extension is installed in chrome, a popup comes up which says [Extension_name] has been added to chrome.
This is the default popup having extension icon and some message. I want to modify this popup data. is there any api which we can use to modify it.
There is no such API, but you can use onInstalled event to open new tab with your own description.
In addition to Deliaz's answer, you can create either a browser action or a page action popup. You can change popup html dynamically to make it look completely different depending on the situation but you can't open it programmatically (desktop notifications could be used for alerts).
Here's another reference which might also help.

Hide Chrome extension button in tool bar by default

Is it possible to hide the Chrome extension button that gets added to the tool bar by default (without the user having to right click the button to hide it)?
It serves no purpose as the functionality of the extension I have created is only accessible via the right click menu.
No, because of the original reason for this behavior - making the user aware they have the extension installed.
I understand it makes little sense for new extension installation, but I doubt Chrome developers would back down on it - so a feature request is unlikely to succeed.

Get the active tab url in crossrider

I came to know that crossrider.com is helping us to develop extension for different browsers, while keeping the same code.
I have two questions
Question 1:
After going through docs and libraries in crossrider, I still wonder how to get the active tab url.
Question 2:
I also need to open a popup after clicking toolbar icon, similar to google chrome extension.
I came across crossrider siderbar plugin. But, I am unable to change the url for sidebar dynamically.
Do we have any other crossrider plugins which opens like an popup ?
Answer Q1: You can use our appAPI.tabs.onTabSelectionChanged(function callback([{tabId, tabUrl}])) method (soon to be documented). To keep track of the ActiveTab URL, in the callback, simply set a global variable to the callback's optional tabUrl parameter. This is currently supported in Chrome and Firefox.
Answer Q2: I'm afraid that currently there isn't a native popup plugin (your welcome to write one and submit it for consideration ;-)). However, you can configure and use jQueryUI popups from within the extension.
I need to get active tab url in IE.
If it is not possible using jquery in IE, can we use messaging api to send messages from pages to background scope, and store the active tab url in background's global variable?

Chrome Extension: Hide and show the browser action icon

Is it possible to show and hide the browser action icon from the options page?
I know how to do it with the page actions using the show and hide methods, but I don't see any similarities in browser actions.
From https://developer.chrome.com/extensions/browserAction:
If you want to create an icon that isn't always visible, use a page action instead of a browser action.
In other words: no, this isn't possible. Browser actions are permanent by design.
Google defined Browser Action as static buttons, and Page Action as dynamic ones.
Google is very careful with Chrome's interface, and don't want people use buttons in a different way they are "supposed" to do.
They do so because they think users have tu put an effort to learn to use Chrome, and Google want to present a consistent, coherent and minimalist user interface.
You don't have much freedom with regard to Chrome user interface.

HTML5 Chrome supported popup Dialog box?

I'm wondering is there anyway of creating a dialog box for a Chrome extension using HTML5 or otherwise? basically I'd love to have a dialog box that looks more elegant than just creating a new window. Is there anything available to do so I'm attempting to create a popup effect.
Challenge / Issue:
1) Chrome was not supporting windows popup
Reason:
Google Chrome no longer supports window.showModalDialog, breaking several enterprise apps such as OWA, EAC, SAP, and others.
Why:
1) Google decided to deprecate window.showModalDialog in Chrome 35 due to its related code complexity
2) Google believe that showModalDialog is a “bad API” that, according to their measurements, is not used extensively
Immediate Solution:
The immediate solution is to switch to IE or Firefox. For those willing to stay on Chrome, one way to temporary solve this problem
is to enable this deprecated feature in Enterprise Policy settings, which can be done only until April 30, 2015
(http://www.bugdebugzone.com/2014/08/sitecore-modal-pop-ups-are-not-working.html)
Another approach:
Another partial solution is using a ShowModalDialog polyfill as explained in this post, but some of the functionality
is still not restored.
Approach our team adapted:
Work with Window.Open method and tweak the javascript code to adapt this method to refresh the parent window and pass values to and from.
I think the best way to do this would be to inject a <div> into the page and position / style it using CSS. It is possible to include other JavaScript libraries with your plugin, so, you could look into using jQuery UI's Dialog.