Where I can find an example code of chrome extension which shows the current address in a popup?
Thanks.
Ron
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Documentation: http://code.google.com/chrome/extensions/getstarted.html
Samples: http://code.google.com/chrome/extensions/samples.html
This is the official documentation and sample code for Google Chrome extensions. In your manifest you want to declare a popup for either a page or browser action (whichever best suites your extension). In your popup HTML file you probably want something like the following;
This very simply appends the URL of the selected tab to the body of the popup.
Your manifest should look like the following;
The file structure for this example is a single folder containing
manifest.json,popup.htmlandicon.png.On the Extensions page (chrome://extensions) you should click Load unpacked extension… and navigate to this folder. If you make any changes to the manifest be sure to click the Reload link to pick up these changes.
I hope this helps but I strongly suggest reading through the documentation I mentioned above to get a better understanding of what you’re doing.
EDIT: Added missing
nullargument to code and included an example manifest and file structure based on additional information gathered from comments.