Click here to Skip to main content
15,895,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

From last few days i m trying to create a chrome extension that would help me to automatically logged into my gmail account. It's working fine using content script which automatically enter my email id and password into the text boxes and click on signin button. Now, i am having multiple email id's with same password. For this, i created an array which includes my 10 email ids and applying a loop which will enter my id one by one but the problem is as the page get loads once again my script also get loads, so the loop starts with 1st element of array every time.

To resolve this i tried working on file handling (file contains 10 email ids) with jquery.get() function in my content script. Problem with file handling is:-

The content script works only when "https://accounts.google.com" page loads(because of manifest file "matches": ["https://accounts.google.com/*"], code). When i tried to fetch a text file("1.txt") in content script using $.get function residing on same folder where the script file is placed , it generates an error message in chrome console "GET https://accounts.google.com/1.txt 404 (Not Found)", which means it start searching for my text file on google server but not on my system.

Now how, can i apply the content-script on gmail page while fetching text file from my own system.

Thanks in advance...
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900