Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7620631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:58:58+00:00 2026-05-31T03:58:58+00:00

i want to make a chrome extension on google reader and i found a

  • 0

i want to make a chrome extension on google reader and i found a problem. content script can not access to iframes. For all n, window.frames[n] = undefined. And i have this “all_frames”: true in manifest.json. Or someone could tell me how to add a button under each article. Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T03:59:00+00:00Added an answer on May 31, 2026 at 3:59 am

    From taking a quick look at Google Reader’s rendered HTML, the only button that is in an IFRAME appears to be the Google Plus +1 button – all the other buttons are not in an IFRAME. So you don’t need to worry about the IFRAME.

    I’m assuming that the existing buttons are the buttons that appear underneath each article: +1, Share, Email, Keep Unread, Add Tags.

    If you want to add a new button to the existing article buttons all you need to do is enumerate the DOM – specifically the “entry-actions” DIV classes and append say a new SPAN with your element/button to each article.

    I suspect (but not sure) that Reader may dynamically update the DOM with new articles. If this is the case you may need to track new articles being added to the DOM so you can add your button again. To do this add an event listener for DOMNodeInserted – e.g.

    document.addEventListener('DOMNodeInserted', onNodeInserted, false);
    

    UPDATE:

    The reason you can’t see “.entry-actions” class is because it is added dynamically.

    Here is a working very basic example. This will monitor the DOM and when it sees an entry-actions DIV that doesn’t have our “.myclass” SPAN button, will add it.

    You need to have jquery included in your extension for this to work. I’ve used jquery-1.7.1.min.js in this example. You will also need an icon file called foo.png too if you cut and paste the example.

    manifest.json

    {
      // Required
      "name": "Foo Extension",
      "version": "0.0.1",
    
      // Recommended
      "description": "A plain text description",
      "icons": { "48": "foo.png" },
      //"default_locale": "en",
    
      // Pick one (or none)
      "browser_action": {
        "default_icon": "Foo.png", // optional
        "default_title": "Foo Extension"      // optional; shown in tooltip
        },
    
      "permissions": [ "http://*/", "https://*/", "tabs" ],
    
      "content_scripts": [
        {
          "matches": ["http://*/*", "https://*/*"],
          "js": ["jquery-1.7.1.min.js", "content_script.js" ],
          "run_at": "document_idle"
        }
        ]
    }
    

    content_script.js

    var timer;
    
    document.addEventListener('DOMNodeInserted', onNodeInserted, false);
    
    function onNodeInserted(e)
    {
        if(timer) clearTimeout(timer);
        timer = setTimeout("addButtons()", 250);
    }
    
    function addButtons()
    {
        console.log('add buttons');
        var $actions = $(".entry-actions").filter(function() {
            return $(this).find('.myclass').length === 0;
        });
        $actions.append('<span class="myclass"><a href="javascript:alert(\'hey! Im a foo extension injected button!\');return false;">My button</a></span>');
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I Want to make Firefox and Google Chrome Add-on in which language can i
I want to make a chrome extension that will connect to a localhost server
I am working in chrome extension, I want to make paging for table which
I would like to create a google chrome extension. Specifically, I'd like to make
I've been experimenting with a Chrome Extension, and I want to make one similar
Well, i'm currently developping a Google Chrome extension and i need to fetch all
I want to make a chrome extension which performs a certain action when the
I am trying to make a Chrome extension for personal use that makes all
This is not just for Google Chrome extension but also for JavaScript I am
I want to make two block stand side by side. In Opera, Chrome and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.