Dialog to allow user to log in to third parties

Creates the ability to have a dialog pop up when a user wants to log in to a third party to interact: e.g. disqus, youtube, instapaper, etc.
Yes it should.  There should be an x in the corner of the popup which
amounts to "not now".  Pressing escape, or clicking outside the popup,
should have the "not now" effect too...

On Wed, Jul 23, 2014 at 04:38:32PM -0700, Yan Zhu wrote:
> > +function _askUserToWhitelist(tabId, whitelistDomains, englishName){
> > +  console.log('assking user to whitelist');
> > +  var port = chrome.tabs.connect(tabId);
> > +  port.postMessage({action: 'attemptWhitelist', whitelistDomain:englishName, currentDomain:getHostForTab(tabId)});
> > +  port.onMessage.addListener(function(msg){
> > +    for(var i = 0; i < whitelistDomains.length; i++){
> > +      if(msg.action === "allow_all"){
> > +        saveAction('noaction', whitelistDomains[i]);
> > +        reloadTab(tabId);
> > +      } 
> > +      if(msg.action === "allow_once"){
> > +        //allow blag on this site only
> > +        saveAction('noaction', whitelistDomains[i], getHostForTab(tabId));
> > +        reloadTab(tabId);
> > +      }
> > +      if(msg.action === "not_now"){
> 
> shouldn't this be "never" instead of "not_now"?
> 
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/EFForg/privacybadgerchrome/pull/219/files#r15322886

-- 
Peter Eckersley                            pde@eff.org
Technology Projects Director      Tel  +1 415 436 9333 x131
Electronic Frontier Foundation    Fax  +1 415 436 9993