I am new to stackoverflow and generally new at chrome extensions and Javascript, so bear with me! I am creating an extension that consists of a popup window that displays a form where notes can be taken concerning a specific set of web pages. When the form submits (or maybe on load), I would like my extension to extract the URL from the active tab and send it along with all other form data as a reference in the database. Is this possible? I was hoping that the web URL would automatically populate a specific non-editable text box upon launching the popup. Just not sure where to start...Ideas?
I have a popup.html which contains the form and it already submits correctly to a MySQL database. I also use the popup.js file in the extension.
From what I have read, I need to include a "chrome.tabs.query()" function into my code, but I am unsure of how to write the function in javascript and how to interface the variable with the form.
Thanks in advance!