Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to show a pop up in chrome extension?
    primarykey
    data
    text
    <p>I need to show a pop up in chrome extension.Presently the pop up is showing in a new window when the extension icon is clicked.What I need is that when I click on the extension a popup window should be seen just below the extension icon.Just like this <a href="http://developer.chrome.com/extensions/getstarted.html.(please" rel="nofollow">http://developer.chrome.com/extensions/getstarted.html.(please</a> check the pop up in this link).My pop up window(userinfo.html) asks for a login with username and password.When the user enters both username and passwrd, and logins,the pop up should be closed and when the user again clicks on extension icon,it should navigate to a website. How can I do this? Here is my background.js</p> <pre><code>chrome.browserAction.onClicked.addListener(function(tab) { if(!localStorage.username){ chrome.browserAction.setPopup({ popup: "userinfo.html" }); } </code></pre> <p>else //navigate to website }); In this way,i show my pop up.When the user clicks on the icon for the first time after installation the pop up appears.otherwise it navigates to a website.Now my problem is that when i click twice on the icon only,the pop up appears.second problem is that,after i enter name and pwd and clicks login the pop up closes,which is fine..when i clicked again on icon actually it should navigate to the website,but in my code it again shows pop up.When I reload the extension,it works correctly.why is it like that?please help me. There is a file named userinfo.html,which should be shown as a pop up.How can I do this?Please help me.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload