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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:13:25+00:00 2026-05-29T05:13:25+00:00

Well I’m making a chrome extension that parses some webpage, and that’s working right,

  • 0

Well I’m making a chrome extension that parses some webpage, and that’s working right, but I would like to be able to block images, meaning, not to load them, since all the parsing is made in background and it would be faster without the images… is there a way to do so?

$("#data").load(url, function(responseText, textStatus, XMLHttpRequest){ 
    $('img').attr('src','');
    if(XMLHttpRequest.status==200)
        parseLinks();
    else if(XMLHttpRequest.status==301)
        Text="Please login.";
    else
        Text = "Error.";
    console.log(textStatus);
});

function parseLinks(){
  Text = [];
  $("#data .plain").each(function(i){
    var tempArray;// = [];
    var parent = "#"+$(this).parent().attr("id");
    tempArray['text']   = $(parent+' a').text();
    tempArray['link']   = $(parent+' a').attr('href');
    tempArray['ad']     = $(parent+' font[color="#808080"]').text();
    tempArray['value']  = $(parent+' td[width="100"] font').text();
    Text[i] = tempArray;
      });
  if(Text.lenght)
    console.log("ads loaded!");
  else
    Text = "No new ads.";
  console.log(Text);
 }

Also, the more time you keep running the extension the more ram an vram the extension will be using, since it accumulates the images in each of the ajax request…

  • 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-29T05:13:26+00:00Added an answer on May 29, 2026 at 5:13 am

    Solved it, I had to change from .load() to $.get() to be able to remove images via .replace() before the html requested is inserted in the page, here’s the code:

    $.get(url, function(responseText, textStatus, XMLHttpRequest){ 
        console.log(XMLHttpRequest.status);
        if(XMLHttpRequest.status==200) {
            var loggedin = responseText.search('<div class=header>Account Login</div>');
            if(loggedin == -1){
                responseText = responseText.replace(/<img/gi, '<noload');
                parseLinks(responseText);
            } else {
                Text="Please login.";
                chrome.browserAction.setBadgeText({text:'L'});
                chrome.browserAction.setBadgeBackgroundColor({color:[180,180,180,255]});
            }
        } else {
            Text = "Error.";
            chrome.browserAction.setBadgeText({text:'\u00D7'});
            chrome.browserAction.setBadgeBackgroundColor({color:[255,0,0,255]});
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Well, I have a application which somehow requires some system resources, but how do
Well... simple question, right? But with no so simple answers. In firefox i use
Well, i have such-like code that prevent select all action from keyboard: $(document).keydown(function(e){ //
Well the problem is that I was using code like this: new Date().toJSON().slice(0, 10)
Well, first I know that this question was already asked several times. But I
well i have a configuration like this in the components part of my config
Well, the title pretty much states it. I want to be able to draw
Well after much messing about I have finally got a query that gives sales
Well, I am storing variables inside of a class that will be used for
Well I'm making an program about payrolls and I'm stuck. In the program, after

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.