The Un-Official Proxomitron Forum
[req] Filter for barely legible text on dark bgnd - Printable Version

+- The Un-Official Proxomitron Forum (https://www.prxbx.com/forums)
+-- Forum: Proxomitron Filters (/forumdisplay.php?fid=38)
+--- Forum: Filter Help/Request (/forumdisplay.php?fid=31)
+--- Thread: [req] Filter for barely legible text on dark bgnd (/showthread.php?tid=1393)



[req] Filter for barely legible text on dark bgnd - leecovuk - Jun. 01, 2009 11:05 PM

Hello again everyone,

You know those annoying sites where they have something like grey text on a brown background, or something like that? I really have no idea why they do it, seeing as they are barely legible.

Is there a filter or method for forcing the style to something like white text on the same background, or maybe black text on a white background?
I appreciate and doubt, however, that a generic method could work for all sites.

All I do at the moment in Firefox, is select 'No style' from the dropdown 'View' and 'Page Style' menus, but that usually breaks the page generally.

Thanks for any wisdom,
Lee


RE: [req] Filter for barely legible text on dark bgnd - Arne - Jun. 02, 2009 12:17 AM

Maybe this will help you?

http://prxbx.com/forums/showthread.php?tid=776&highlight=style+background


RE: [req] Filter for barely legible text on dark bgnd - lnminente - Jun. 02, 2009 01:24 AM

Also this bookmarklet: http://www.russellbeattie.com/blog/the-zap-colors-bookmarklet


RE: [req] Filter for barely legible text on dark bgnd - ProxRocks - Jun. 02, 2009 10:20 AM

i'll try the previous two post fixes later on...
but i do have a fix that i already implement for STUPID background colors that make text unreadable...

i use the SAME background for ALL web pages by DISABLING "body backgrounds" with
Code:
Name = "Header Top Inject: User CSS - Disable Body Background [add]"
Active = TRUE
URL = "$TYPE(htm)"
Limit = 16
Match = "(^(^<ProxHdrTop>))$STOP()"
Replace = "<style type="text/css">"
          "body {"
          "    background: none !important;"
          "    }"
          "</style>\n"

then axing CSS backgrounds with
Code:
Name = "CSS: Remove CSS Backgrounds [add]"
Active = TRUE
URL = "($TYPE(htm)|$TYPE(css))"
Limit = 256
Match = "backgroun(d)\3(-image : url| : ([^ ;}]+ |)url)\1"
        "$NEST(\($TST(tStyle=*), $AV(\0) ,\))"
Replace = "background\1(http://local.ptron/killed.gif)"

coupled with these
Code:
Name = "Dim: White Backgrounds {2.d} (modified) [add]"
Active = TRUE
Multi = TRUE
URL = "^$TST(keyword=(*.a_wbg.*))"
Limit = 32
Match = "(b(gcolor=|ackground(-color|) : ))\1("|'|)\3"
        "((white|((#|)(f[a-f0-9]f([a-f0-9]f[a-f0-9]|(^[a-z0-9]))))))(;|"|'|)\2"
Replace = "\1\3#EDEAD9\2"

Name = "Dim: Specific Dark Backgrounds [add]"
Active = TRUE
Multi = TRUE
URL = "^$TST(keyword=(*.a_wbg.*))"
Limit = 32
Match = "(b(gcolor=|ackground(-color|) : ))\1("|'|)\3"
        "((rgb(\4)(;)\5|((#|)(3d4831|1a1c1d))))(;|"|'|)\2"
Replace = "\1\3#EDEAD9\5\2"

all coupled together, i do not get any STUPID dark text on top of a dark background... but i do, seldom, but do get white text on top of my very very faint gray background that i use on ALL web sites, there is no background differences from one site to the next for me, the entire web universe uses #EDEAD9... and when i find one, i just add it to the specific filter Big Teeth


RE: [req] Filter for barely legible text on dark bgnd - ProxRocks - Jun. 02, 2009 10:23 AM

of course, prior to the #EDEAD9 fix, i used to use GreenBrowser's "reverse colors" plugin, that at least made the web page "readable"...

edit: oh, and Window's "display properties" defaults my backgrounds to #EDEAD9 if the web page itself doesn't define it...


RE: [req] Filter for barely legible text on dark bgnd - leecovuk - Jun. 02, 2009 12:01 PM

Thanks very much for these helpful replies.
I will give them all a go later. It's nice to have some possibilities.
Smile!

Lee


RE: [req] Filter for barely legible text on dark bgnd - ProxRocks - Jun. 02, 2009 12:18 PM

not sure what browser you are using, but if you are using GreenBrowser, the bookmarklets %20's need replaced with spaces ( ) and the %22's need replaced with quotes (") for it to work as a GB plugin...

that's a nice addin to my plugin bar, i'm still fiddling with Siamese's filters, as i prefer the plugin bar to be a 'last resort' and would rather have Proxo do everything "for me"...


RE: [req] Filter for barely legible text on dark bgnd - lnminente - Jun. 02, 2009 01:14 PM

My favorite fix for that is using the topographic view. I remember Sidki has it in its menu.

Anyway here is the code for the bookmarklet respecting background images:
Code:
javascript:(function(){function%20crawl(e,%20r){if%20(e.nodeType!=1)return;var%20ch%20=%20e.firstChild;while%20(ch!=null){crawl(ch,%20r+1);ch=%20ch.nextSibling;}if(r>15)%20c='#FCC';else%20var%20c%20='#'+r.toString(16)+r.toString(16)+r.toString(16);if(r>9)e.style.color='#000';else%20e.style.color='#FFF';e.style.backgroundColor=c;e.style.borderColor=c;}crawl(document.getElementsByTagName('body')[0],%200);})()