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 7078587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:33:58+00:00 2026-05-28T06:33:58+00:00

I was trying to develop a Chrome extension that can display me the last

  • 0

I was trying to develop a Chrome extension that can display me the last 3 news from a soccer news site (obviously the page is not open in any tab), by refreshing every 5 minutes. My ideea was to load the page inside an iframe and, once the page is loaded, access the page DOM and extract only the text nodes with the news. I’ve tried in many ways using ready and load functions, I tried to follow this solutions here but i always get warnings. My question is: is there a way I can do that without having troubles with cross-domain security? Are there any simple examples i can use?

  • 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-28T06:33:59+00:00Added an answer on May 28, 2026 at 6:33 am

    Here’s how you could do it using JQuery (please keep in mind I dont know JQuery, just saw this approach somewhere and thought it might work for you).
    I put this in a popup and it worked….

    <!DOCTYPE html>
    <html>
    <head>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
    <script>
    
    function renderNews(newsList){
          $('#news').html('');
          $(newsList).each(function(i,item){
             var link = document.createElement('a');
             $(link).attr('href',item.link);
             $(link).html(item.description);
             $(link).click(function(){
                chrome.tabs.create({url:$(this).attr('href')});
             });
    
             var linksDate = document.createElement('span');
             //$(linksDate).text(item.date);
             $(linksDate).text(item.day + '-' + item.month + ' ' + item.hour + ':' + item.minute+' - ');
    
             var listItem = document.createElement('li');
             $(listItem).append(linksDate).append(link);
    
             $("#news").append(listItem);
           });
    }
    
    
      function getNews() {
       $.get("http://www.milannews.it/?action=search&section=32", null,  function(data, textStatus)
        {
    
            if(data) {
            var news=$(data).find(".list").find('li').slice(0,3) ;
            $("#status").text('');
    
          var newsList=[];
          $(news).each(function(i, item){
           var newsItem={};
           newsItem.description=$(item).find('a').html();
           newsItem.link='http://www.milannews.it/'+$(item).find('a').attr('href');
           newsItem.date=$(item).find('span').first().text();
           newsItem.day=newsItem.date.split(' ')[0].split('.')[0];
           newsItem.month=newsItem.date.split(' ')[0].split('.')[1];
           newsItem.hour=newsItem.date.split(' ')[1].split(':')[0];
           newsItem.minute=newsItem.date.split(' ')[1].split(':')[1];
           newsList[i]=newsItem;
          });
          renderNews(newsList);
          localStorage.setItem('oldNews',JSON.stringify(newsList));
            }
        });
      }
    
      function onPageLoad(){
       if (localStorage["oldNews"]!=null) renderNews(JSON.parse(localStorage["oldNews"]));
       getNews();
      }
    </script>
    </head>
    <body onload="onPageLoad();" style="width: 700px">
    <ul id="news"></ul>
    <div id="status">Checking for new news...</div>
    </body>
    </html>
    

    And dont forget to put the urls your getting with the xhr stuff in the permissions part of your manifest….
    http://code.google.com/chrome/extensions/xhr.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to develop a firefox extension that inserts additional HTTP header fields into
I'm trying to develop a Google Chrome extension. When the user clicks the extension
I am trying to develop a multimedia site and I am leaning heavily toward
I am trying to develop everything in sharepoint as features so I can easily
I'm trying to develop an application that will use getImageData in javascript in Firefox
I'm trying to develop a bit of JavaScript that will detect the language of
Trying to develop using MVVM: I have this Csla.PropertyStatus control that is created in
I've been trying to develop a linq query that returns the ItemNumber column of
I'm trying to develop a firefox extension which draws a toolbar at the base
I am trying to develop a simple map application, which will display a map

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.