Web lists-archives.com

Re: [kde-linux] User style sheet no longer with Konqueror 4.9+




On Monday 17 Dec 2012, Duncan wrote:
> Robin Atwood posted on Sun, 16 Dec 2012 19:50:30 +0800 as excerpted:
> > Since forever I have used a simple user style-sheet to force
> > black-on-white default on web pages. This is necessary because I have a
> > light-on-dark colour scheme and text can be unreadable if the background
> > is defaulted. The CSS is not fancy, e.g.
> > 
> > body {
> > 
> >   background-color: white; color: black;
> > 
> > }
> > 
> > INPUT {
> > 
> >   background-color: #E1E7FD;
> >   color: black;
> > 
> > }
> > 
> > Since about KDE 4.9 it is now completely ignored. Anyone else notice
> > this?
> 
> FWIW, I too prefer light on dark.  But I wanted /some/ color, just
> enforcing light on dark, not the other way, and (as you mention) dealing
> with sites that set one of foreground/text or background, but not both.
> So I ended up with a different solution, which may or may not be suitable
> for you.
> 
> What I do is use a web proxy, privoxy, running on localhost (the same
> computer).  The browser then uses privoxy, thus making the solution
> browser agnostic, a fact that helped greatly when I decided to switch to
> firefox from konqueror.  (I could go into the reasons, but suffice it to
> say I'm not happy with the security treatment konqueror gets, compared to
> a "real" browser.)
> 
> Here's the privoxy home page: http://www.privoxy.org
> 
> The biggest down side is that privoxy won't filter secure connections
> (there's a way to do it, but it's complicated and has other risks, so I
> haven't), so they normally stay at defaults.  However, it seems that most
> sites, banks, online purchasing, etc, that bother with secure connections
> are written well enough that while I might get irritating black on white,
> they *DO* set BOTH foreground and background if they set one of them, so
> at least they're generally readable.
> 
> The big upside is that privoxy, formerly known as junkbuster, works great
> for filtering ads and other irritants as well, and that if the filters
> break for some reason, they're under my control so I can either bypass
> the proxy or rewrite the filters as necessary.  Of course modifying the
> filters does require a bit of patience and skill with regular
> expressions, but if you're not upto that, just use the bypass where
> necessary.
> 
> My color-rewriting filterset is based on the idea of keeping the page's
> colors as much as possible, but rewriting the HTML/CSS color-codes (and
> filtering background images) where necessary, to make light backgrounds
> darker, while making dark text lighter.  Thus for example, dark brick-red
> text on a white background becomes brighter red text, on a black
> background.  I've incrementally developed the filterset over some years
> now, since 2003ish I'd guess, so that it handles a lot more pages without
> breaking and requiring a bypass than it used to, but there's still an
> occasional exception that I have to set bypass for and reload[1].
> Ideally you'd use my filterset as a base, continuing to customize it as
> necessary just as I have, but as I said above, if you're not up on your
> regex, etc, just hit bypass and reload when needed.
> 
> If this sounds like something you'd be interested in, let me know.
> Unfortunately I don't have the website I used to keep the filterset on
> any longer, but I hadn't kept it updated anyway.  I can post the filters,
> which are after all text-based, here, tho.
> 
> ---
> [1] Another option is a browser extension such as the firefox "read
> easily" extension, that toggles styles at the touch of a button.  I found
> that about a year ago after my switch to firefox, and use that
> occasionally when my filterset breaks things.  That was another problem
> with konqueror: it simply doesn't have enough market share to properly
> sustain a reasonably useful and active browser extension community, like
> firefox and chrome/chromium do.  In theory, with webkit being based on
> kde's khtml anyway, it would be possible to build a kde browser that
> would support most of chrome/chromium's extensions, thus allowing kde
> users to participate in and make use of that community, but perhaps
> there's simply not the kde developer resources and interest available,
> especially given that a non-kde browser such as chrome/chromium or firefox
> can already be set as the kde default, altho kde integration isn't as
> deep/nice as it is with konqueror.
> 
> The same thing can normally be done manually using the page style
> switcher option that most browsers including konqueror and firefox
> offer.  But that's little enough used by the majority that the option's
> generally buried deep in a menu somewhere, requiring an extension to make
> it one-touch usable as a toolbar and/or hotkey option, and konqueror only
> seems to enable the option if the page author provided style
> alternatives.  (Firefox seems to always have at least the basic style as
> presented by the page author, and no style, as options, effectively
> letting you toggle between no stylesheet and the normal page stylesheet,
> with more options when the page author makes them available.)

Thanks for the (lengthy!) response but I will stick with CSS.

Cheers
-Robin
-- 
----------------------------------------------------------------------
Robin Atwood.

"Ship me somewheres east of Suez, where the best is like the worst,
 Where there ain't no Ten Commandments an' a man can raise a thirst"
         from "Mandalay" by Rudyard Kipling
----------------------------------------------------------------------








___________________________________________________
This message is from the kde-linux mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde-linux.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.