Suppress _most_ images

2015-12-18 Thread Lawrence San
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: 

--- 
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.


Re: Suppress _most_ images

2015-12-18 Thread Ronald J Kimball
If the problem you're trying to solve is showing only the images you care
about in the Net panel, have you tried using Chrome?  Its Developer Tools
Network panel has a filter feature, unlike Firebug.

Ronald

-- 
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: 

--- 
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.


Re: Suppress _most_ images

2015-12-18 Thread Lawrence San
You're right -- I was so focused on BBEdit + Firebug that I forgot all
about Chrome. Just tried it: Chrome's Network panel filters, and lets me
resize the column widths, and has a convenient "Disable cache" checkbox.
Much better than Firebug, for this purpose anyway. (I typically ignore
Chrome's devel tools because of all the great extensions I've installed in
Firefox.) Thanks much Ronald!


On Fri, Dec 18, 2015 at 5:41 PM, Ronald J Kimball  wrote:

> If the problem you're trying to solve is showing only the images you care
> about in the Net panel, have you tried using Chrome?  Its Developer Tools
> Network panel has a filter feature, unlike Firebug.
>
> Ronald
>
> --
> 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: 
>
> ---
> 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. 
>

-- 
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: 

--- 
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.


Re: Suppress _most_ images

2015-12-19 Thread Oliver Boermans
Not sure if Firebug does, but Firefox can filter network requests:
https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor#Filtering_by_URL

If you are still looking for another approach (involving JavaScript) feel
free to ask me off list.

Cheers
Ollie

On 19 December 2015 at 12:19, Lawrence San  wrote:

> You're right -- I was so focused on BBEdit + Firebug that I forgot all
> about Chrome. Just tried it: Chrome's Network panel filters, and lets me
> resize the column widths, and has a convenient "Disable cache" checkbox.
> Much better than Firebug, for this purpose anyway. (I typically ignore
> Chrome's devel tools because of all the great extensions I've installed in
> Firefox.) Thanks much Ronald!
>
>
> On Fri, Dec 18, 2015 at 5:41 PM, Ronald J Kimball  wrote:
>
>> If the problem you're trying to solve is showing only the images you care
>> about in the Net panel, have you tried using Chrome?  Its Developer Tools
>> Network panel has a filter feature, unlike Firebug.
>>
>> Ronald
>>
>> --
>> 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: 
>>
>> ---
>> 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. 
>>
>
> --
> 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: 
>
> ---
> 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.
>

-- 
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: 

--- 
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.