Link to home
Start Free TrialLog in
Avatar of taz8020
taz8020Flag for United Kingdom of Great Britain and Northern Ireland

asked on

Get value from web page in chrome extension

Hi I am trying to making a google extension, I want to check if a url is open in a tab eg  "http://www.mywebpage.com/" and if it is get a value in a script var on that page.
I just have no idea how to do this. I have added the url in the manifest.json but have know idea what i need to put in the background worker.
It only needs access to one web page so don't want to say have access to all tabs.

the script var on that page is
var user = {"id":123,"email":"sales@123.com"}

Open in new window


I want to get the ID and email, then save that in the extension, and update it if it ever changes. This way they only have to go to page once for my extension to work, but if they do change their email and they revisit the page then it auto updates and saves it back to extension.

please help.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.