I have a question on chrome extension background. I wanna use background to load other website to parse data I want and pass it to my tab use Message API.
But, I have no idea to load the webpage in background, I don't want to use iframe.
First, I tried the window.location.href to change, but it didn't work.
Does anyone have any ideas?
Thanks a lot.
Related
I am developing a chrome extension, Some of my function works when the page reloads, but in some website content is changed without reloading the page, only hash is changed. My functions are in content script. I need to reload them as URL changes.
I tried to use window.location.hash, I wrote this line in content script, but I see no result.
I am not sure is it because of content script or something else.
It would be very helpful if anyone tell me any way to reload my functions when URL changes. Thank you very much. Very much appreciate your help.
I've done some looking around and couldn't find any solution to this problem.
I'm creating a Chrome extension, with a manifest that points to the opening file home-times.html. This works, though I want to redirect it internally to the other page home-welcome.html inside the extension so it loads another page INSIDE the extension.
I've read a lot of questions that refer to changing the current tab's page, though that's not what I am after.
Tests
By using the following code:
test
Opens a new tab, with the extensions page that I am trying to access in that new tab.
If I got you right, you want to change your popup innerHTML, in this case I suggest using jQuery, to change original file to the result you want.
If you just want to open new tab, with your home-welcome.html, you can do this, in your popup.js :
window.open('home-welcome.html','_blank')
If none of this is what you are looking for, can you please provide an example, I will try to help.
Is a chrome extension able to display different iframes, though through of which one is able to select different iframes in a menu bar inside the chrome extension?
I’d appreciate any helenter image description herep ! :)
If so, how can it be done ? Do I need to use JavaScript or is it done in the html file fullly? I’d very much appreciate an example :)
Yes but no, the content scripts will NOT execute in the iframes loaded dynamically via JavaScript in the page, only the html i think.
reference: https://stackoverflow.com/a/8917679/4674037
an iFrame is the separate web page with a separate URL.
You can not get iFrame content, but you can integrate your chrome extension directly into iFrame through URL in the manifest file. In this way, your extension will work with iFrame content as usual.
i want to load a specific part of website in iframe, unfortunately iframe is not loading , i have tried object, iframe, framset and jquery too load but i am failed.
I need your help to sort it out and show a specific part from this website
http://www.weddingwire.com/weddings/2816607/wedding_new_website/preview
i need this part of website (http://prntscr.com/30051k)
Please help me .
Thanks
You won't be able to embed this website using iframe since it have X-Frame-Options header.
You can try displaying it with curl.
I'm building a webapp using sencha touch, and I need to use some images from another website. These images are updated every 10 minutes, so the source of the images is changing all the time. So I don't have an specific url where to get the images.
Can anyone suggest a way to get the source of the images using javascript?
I tried with jsonp, but got nothing more than an error.
I will appreciate your suggestions.
There is two javascript solutions:
Ajax request to the website API
Load the page into an hidden iframe, onload, fire the update of the image, search for the source image you want in the iframe childrens, then delete the DOM of the iframe