The Un-Official Proxomitron Forum
Image Placeholder Fix for Opera - Printable Version

+- The Un-Official Proxomitron Forum (https://www.prxbx.com/forums)
+-- Forum: Proxomitron Filters (/forumdisplay.php?fid=38)
+--- Forum: Website Customization (/forumdisplay.php?fid=9)
+--- Thread: Image Placeholder Fix for Opera (/showthread.php?tid=1167)



Image Placeholder Fix for Opera - whenever - Dec. 04, 2008 08:09 AM

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/topic.dml?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 = "\@"



RE: Image Placeholder Fix for Opera - lnminente - Dec. 04, 2008 10:54 AM

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