Post Reply 
Image Placeholder Fix for Opera
Dec. 04, 2008, 08:09 AM
Post: #1
Image Placeholder Fix for Opera
Opera doesn't display image placeholders for <img> tag that has an empty alt value, for example alt="".

You won't know there is a image there if the image link is broken or too slow to load under normal mode.

I use "Cached Images" mode as default to view new sites. You won't know if there are some images somewhere if they are not in cache.

The below filter simply remove the empty alt property to get the image placeholders back so you can right click on the placeholder to load images selectively.

I didn't handle the <image> tag because it is seldom seen now.

I use $NEST(<img\s,>) instead of <img\s[^>]+> to cover code below:
Code:
<img src=... onload="if(this.width>screen.width*0.7) .../>

Use "Cached Images" mode to see the difference. Test Site: http://my.opera.com/community/forums/top...?id=257954

Code:
[Patterns]
Name = "Opera Image Placeholder Fix 2008.12.04 [whenever]"
Active = TRUE
Multi = TRUE
URL = "$OHDR(User-Agent:*opera*)$TYPE(htm)"
Bounds = "$NEST(<img\s,>)"
Limit = 768
Match = "\#alt=$AV(^?)\#"
Replace = "\@"
Add Thank You Quote this message in a reply
Dec. 04, 2008, 10:54 AM
Post: #2
RE: Image Placeholder Fix for Opera
For my habit i would add a space before the second \# to not match the text inside the parenthessis, but here is not needed. I like the $OHDR(User-Agent:*opera*). A very good filter! Many thanks whenever!

For older versions of Firefox i was using http://userstyles.org/styles/11093
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: