Results 1 to 2 of 2

This is a discussion on "Simple" start ... I am confused within the Plugins Development section, part of the Chrome Plugins category: Hi there, first of all ... I am really not a newbie. I have been programming for more than 25 ...


  1. #1
    devnull69 is offline Member
    Join Date
    Jul 2010
    Posts
    32

    Default "Simple" start ... I am confused

    Hi there,

    first of all ... I am really not a newbie. I have been programming for more than 25 years. And now I wanted to get started with Google Chrome extensions. I looked at several examples and all of them worked well. But when I tried to develop something for myself I got stuck ... deeply stuck. I'm confused about sending and receiving messages, the background page, the content script ... everything.

    In short terms: I wanted to extract the src attribute of an image with id "fc_image" from an opened page (inside a tab) and display this attribute as text in a popup.

    I chose to have it as a browser action (even if it is only for certain pages right now, but it will be more general in the future).

    The manifest.json has a reference to the background_page "background.html" and permissions ["tabs", "http://*/*"]

    Now the background.html should inject the content script "contentscript.js" into the page. The script should extract the src attribute from the image and ......... somehow ...... bring it back to the popup.html to show it (and to continue working with it). Can someone give me a hint how the injection and the message passing can work between the mentioned files?

  2. #2
    devnull69 is offline Member
    Join Date
    Jul 2010
    Posts
    32

    Default

    Ok I did it ... I had a typo in a json object (semicolon instead of comma) which was not reported on the console ... and I overlooked it sooo many times.

    Thanks anyway!

Similar Threads

  1. Replies: 4
    Last Post: 03-03-2010, 12:29 AM
  2. Replies: 0
    Last Post: 02-02-2010, 06:56 PM
  3. New "Simple New Tab Page" ?
    By seriosbrad in forum Plugins Troubleshooting
    Replies: 3
    Last Post: 12-03-2009, 07:18 PM
  4. Replies: 6
    Last Post: 09-26-2009, 05:57 PM
  5. Google Chrome "Load unpacked extension" Button Does Not Exist
    By chayimf in forum Plugins Troubleshooting
    Replies: 4
    Last Post: 09-05-2009, 11:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •