Improvement requests :  K-Meleon Web Browser Forum
Use this forum to talk about a feature you're missing. 
Disable Style Sheets Macro
Posted by: Peabody
Date: November 27, 2006 10:23PM

There is a macro available at the K-M web site that allows end-users to toggle style sheets (http://kmeleon.sourceforge.net/wiki/Disable+Style?PHPSESSID=e6783a4f7a3e736cd4a342b5465e44f2). This is a useful macro and similar to an extension I used in Firefox.

Unfortunately, this macro as written requires the end-user to enable JavaScript externally. Not good. I always surf with JavaScript disabled externally because the majority of hacks are performed through JavaScript. I enable JavaScript only for a handful of trusted sites.

I possess no knowledge or skills with the JavaScript language. I would be grateful if somebody with the necessary skills could revise this otherwise useful macro such that end-users do not have to have enable JavaScript externally.

Thank you.

P.S. I think that this macro is quite useful and should be included in the default macro package rather than as an add-on. If the devs agree for version 1.1, then a tool bar icon next to the zoom icons would be great too.

Options: ReplyQuote
Re: Disable Style Sheets Macro
Posted by: rmn
Date: December 01, 2006 06:35PM

Okay, I've just changed Disable Style to use the recommended way to run JS from macros. Could you check if it works correctly?

Options: ReplyQuote
Re: Disable Style Sheets Macro
Posted by: Peabody
Date: December 01, 2006 11:21PM

I tested the new code.

First, the new code seems to work the same as the old code with external JS enabled. With external JS disabled, the new code seems to work just fine. Mission accomplished with respect to updating the code!

Some comments:

The current new macro code disables style sheets but does not disable page colors or fonts.

With Firefox I use an extension called Read Easily. I do not want to compare apples and oranges, but I want to note something different between the two approaches. The FF extension not only disables the style sheet, but also disables background colors and fonts too.

I tested Opera, but Opera is more configurable in this respect. With Opera users can configure more precisely what "user mode" entails. Yet, with one check box, in Opera I can configure "user mode" (or non style sheet mode) to exclude page colors and fonts. I can configure Opera to show only the text elements and images and no styles or colors. This is the same as the FF extension.

Disabling colors and fonts might not seem to be within the functional intent of the K-M macro code, but I believe this is the correct approach. That is, when "disabling styles" the user usually wants to disable all layout and structural elements of the page. Can this feature be added to the new macro code?

Lastly, how do I add a toolbar button to serve as a toggle for this macro code? I easily added menu options, but from a user interface perspective, a toggle button is more useful and appropriate, much like the way Opera does this and the FF extension mentioned. I can add a keyboard hotkey, but the button should still be there. To be more specific, I do not want two buttons, one for enabling and one for disabling, but a toggle button, functioning much the same as those provided in the Privacy bar. Is this possible?

Options: ReplyQuote
Re: Disable Style Sheets Macro
Posted by: rmn
Date: December 07, 2006 04:27PM

All the things you mention are technically feasible, but are a bit complicated for me.

To anyone interested in helping: feel free to take this.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.