Is it possible to set autofill form data via chrome extension? - javascript

I am looking to build a chrome extension wherein I the extension can set the chrome autofill for a person (i.e. save addresses and other information like basic form data). I can then go to a few websites, fill a few forms.
The extension can then set the data for another person and the cycle repeats.
Since the forms can contain dynamic fields, I want this data set in the autofill so chrome can take care of most of the part and I can rectify any problems before submitting the form.
I haven't found a direct chrome extension API to do this. Is this possible to be done?
Thanks in advance.
UPDATE: I went through this: Import autofill data from a file into Chrome but is there any way to do it through the extension?

Related

Google Maps JS plugin not loading correctly

I cannot get the google maps plugin to load correctly
How can I make it so that my contact form actually sends completed forms to my email or collects it in some way? I would eventually like to add a landing page that pops up thanking them for their form submission, (or maybe just add code to change the submit button to say "Thank you!" after clicked), but my first problem is the form has no way to save the info.
Thanks all!!
The problem appears to be that you're missing a developer's API Key.
https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error
You can get a key here:
Google API Key Docs
FYI - You can see what issues your page has using the Developer Options menu in Chrome, or in Firefox by using the Web Developer Tool from the menu on the right.
As far as collecting information from a form, there are many samples online for saving form data, but they all depend on what development language you are using.

Can I manipulate/manage some website through Chrome app?

I need to simulate the user's work - click buttons, enter data in the field and so on. Is this can be done only through using executeScript or I can receive DOM of and manipulate with it? Or maybe I can work with the tab in the browser separately or exist some other way to do what I need?
I do not believe that you can do this with a Chrome App, but you can do this using a Chrome Extension. Extensions can have full access to a tab's DOM and you can manipulate the DOM as needed. (e.g. fill in form fields, click buttons, etc...).
From: https://developer.chrome.com/extensions/overview
Extensions can interact with web pages or servers using content scripts or cross-origin XMLHttpRequests.
This is how extensions like LastPass are able to fill in the username and password field on any web page you visit.

Fetch URL from Chrome tab and inserting result into user form

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!

localstorage or sessionstorage can't persist data on cross browser

I am working on a small application but I am stuck on a problem. I want stored form element values on a HTML page when filled in on one browser(Ex. Firefox) and auto fill data when same page is loaded in another browser(Ex. Chrome). If anybody has any ideas please help me.
Unless clients can login and you're willing to share this data via your server, you can not change behavior of a different browser from your current, so in your example Firefox can not change a cookie, localstorage or whatever of Chrome. Browsers tend to only share information like cookies when they are first ran; such as with you the import wizard from Firefox.
I can think of two alternatives to achieve this:
An authentication system where the data is stored server-side.
Through custom browser extensions. You could create a custom browser extension that directly writes the data of the other browsers. This does require the user to install that extension though.
This link explain how to achieve that http://www.nczonline.net/blog/2010/09/07/learning-from-xauth-cross-domain-localstorage/
It's not simple, but it's the way that I know it can be done at the moment without the use of cookies.

Reverse engineering form submit

I'm using a hosted cart system to manage a ecommerce platform. The system uses form submission to add items to the user's cart. I want to write a javascript library to allow me to add things to the cart with JS, but I will need to see what the platform is submitting so I can copy it appropriately.
Any advice how to best sniff out what the default form info is getting submitted to the form so I can copy it via jquery?
Thanks!
Open your browser's console; Chrome has it built-in, Firefox has Firebug.
The entire request will be viewable in the network tab.
Another, more-complicated option is to set up a trivial local proxy and dump the request.
You can use TamperData. It's a nice addon for Firefox that let's you view and edit this data.
Firebug and it's derivatives also has the functionality if you have that.
Firebug on firefox using the console and turn on 'persist' it will tell you whats going on after the page posts and stuff. :)

Categories

Resources