I'm working on some JavaScript for a web page that has many, many images in
various places on the page. However the JS is only concerned with
controlling two of those images, plus the main text column. All the other
(irrelevant) images are cluttering up the Firebug Net panel (showing
network activity) so it's hard to focus on the two images I care about.
(BTW, the key issue is at what point in the JS sequence those two images
load relative to the text column, and -- most importantly -- whether
they're loading from the devel server vs. the browser cache.)

I can set Firebug's Net panel to only show images, but that's still a very
long, scrolling list each time the page loads. The Net panel can't filter
the list -- its text box just searches and highlights items one at a time,
but doesn't hide anything. The Web Developer extension for Firefox can
disable _all_ images, but not selectively (i.e. it can't disable all but
two of them).

I tried, in the BBEdit HTML file, to use CSS to set all images to "display:
none" or "visibility: hidden" and then just override that for the two
relevant images. That worked in the browser display of the page, but that's
not what I care about: I discovered (to my surprise) that Firebug's Net
panel still calls the server (or cache) for those images anyway. So that
didn't help.

I ended up duping the whole HTML file to a temporary/devel version, then
doing a "Find All" in BBEdit for "img" and manually going through the whole
long file, commenting out or deleting every image except the two I care
about. That worked, but was really tedious. Part of the problem is that the
images are specified in many different ways: some foreground, some
backgrounds, some specified in the head of that HTML file, some as
backgrounds specified in linked CSS files, some located in the main text
column, some in side columns, etc. So I couldn't think of any simple grep
pattern that would speed it up in BBEdit's search/replace.

I have a feeling there's a better way to do this, but I can't think of what
it is. Perhaps some kind of grep search/replace routine in BBEdit? Or using
an AppleScript in some way? Or some other tool I don't know about? How
would you do this?

Thanks,
Lawrence

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.

Reply via email to