"Style Buttons" (optional with buttons by menu and special editor)
Posted by: siria
Date: December 17, 2009 05:39PM

Man, my first macro and it took me half my life (nearly tongue sticking out smiley) The little one for just killing background-images has grown into a monster baby by now *blush* Yeah, yet another styles macro, I know there are already countless others out there with much better styles and I'm crazy, but I'm finally going to post that thing now - ufff!! ;-)
It's my first, please let me know if it works or if something is completely rubbish...?

It's got a few gimmicks though grinning smiley Comes with a bunch of
- BUTTONS which can be selected by menu (in KM154 / until then only 0-1 button by macro)
- and/or normal buttons by toolbar.cfg, copy-paste per menu to help newbies
- same for ICONS in dropdown MENUS, copy-paste per menu again
- includes the SciTE-EDITOR which has great SYNTAX HIGHLIGHTING, makes it easier to catch typos and to read
- Help file, plain txt which that editor also highlights nicely :-) (plus little popup-helps)
- Menu to choose editor for changing the css-sheets or read cfg or help or kmm-files (choose e.g. windows default editor or user-set)
- Menu to quickly edit the handful stylesheets, plus 5 empty ones for users Test- and Customized styles
- Menu to delete/reset the user-set prefs in about:config, since they quickly add up if someone toggles many buttons or has two toolbars with each 4 positions

Menu-1: (multiple buttons)


So what's that thing good for?

This extension can temporarily modify how web pages are displayed: You surf to a new page, then find it perhaps hard to read or whatever, then you can hit a style button and instantly the page looks different (other text color or size, REMOVED BACKGROUND-IMAGE or other color, highlight links etc.) If you like it better that way - great. If not, try another style (they add up), or hit reload to get the original style back.

Note: No javascript needed, and those style buttons work only for the currently displayed page. They don't prevent anything from getting downloaded, meaning they can't save you bandwidth, sorry. After a page is fully loaded, do what you want with the style, but as soon as you RELOAD the page or go to another one, everything will be back to normal.

PS Windows98: The macro works fine, and the editor too if started from outside the browser, but to get the editor-buttons per menu to work too, set the scite.exe properties on Millenium- or NT-compatible with Kernel-Ex (see help).

Menu to set editor, and note single button above (free choice which, menu is always on right-click):


Menu-3: Some native KM menus, just to have them easier together for newbies.
I was so bold to inject the "hide background-image" into the native page properties menu. If you don't like that, just open stylebuttons.kmm and add a # at those setmenu-lines.


Syntax-Highlighting with Scite, for css etc.: (included kmm-format by kko, thanx :-)


If you wonder what someone in a forum is talking about, somehow you get a suspicion he may have posted an image, but there's absolutely nothing there, not even a broken-image-icon or anything: Hit the image-border-button, it *may* well be that out of nowhere some empty borders appear, and if only a tiny little rectangle! (=age old bug in mozilla browsers for unsized images, hopefully fixed soon - Oops, forgot, it's not a bug it's a feature! ;-) (note: those borders don't seem to show for adblocked images, and alas sometimes "overlook" a few others too)
The borders are set to appear only if an image has no size-tag, because the sized ones have icons if missing. By the way, red-blue borders mean there's a link behind the image, and red-yellow means no links.


If you come across a page where links aren't underlined and almost hidden somewhere in the other text: When you're done reading, hit the links-highlight-button for a quick check:
(Not that links were that hard in this forum, so a bad example, LOL!)


Other examples: Some webpage may have a pretty photo background, but alas the thin text on it is difficult to decipher: Enjoy the photo, then hit the style-button to remove the background image and you can easily read the text. Or you may prefer to merely set the whole text in bold letters instead. Or you may come across a page where you just hate the pink background color: Just exchange it with your favorite color. (Again, bad example pic, but you get the idea ;-)


Style for big fonts and other colors: Perhaps you're someone struggling with bad eye sight, then you can take a look at the original page, in order not to miss anything, then eclipse the background image and set all fonts to big bold black Verdana on nice beige ground or whatever:


Help.txt highlighted by Editor:


DOWNLOAD: (COOKIES must be allowed)

Stylebuttons01 incl. syntax highlighting (700 kB incl. SciTE-editor)

(Stylebuttons01 without editor (37 kB), NOT recommended ;-)
( http://kmeleon.sourceforge.net/forum/file.php?9,file=736,filename=stylebuttons01_macro_only.7z )

Unzip it into the "k-meleon"-folder!

Contains the kmm-macro, a folder KM/styles with a bunch of css-sheets, a folder "editor_scite" which lands in KM/tools, and buttons-pics and help files are in KM/skins/default. All linked in the menus.
The menu "Stylebuttons" shows up in "View", in "Page context", and (if set) on all its toolbar-buttons on right-click.
Attention, the single button (for only opening the menu) needs a bit a longer click, or a right-click, to avoid that bug with outdated checkmarks currently.

Edited 3 time(s). Last edit at 02/28/2014 11:02PM by siria.

Attachments: stylebuttons01_macro_only.7z (21.3 KB)   stylebuttons_menus1.gif (34.2 KB)  
Re: "Style Buttons" (optional with buttons by menu and special editor)
Posted by: disrupted
Date: December 18, 2009 06:36AM

for your very first macro this one is pretty scary. added to kmext under web development & design as "styles-extreme". thank you siria for your contribuation

Re: "Style Buttons" (optional with buttons by menu and special editor)
Posted by: siria
Date: December 18, 2009 11:19AM

Too scary, obviously... :-(
Thanks for the quick addition and flattering name disrupted, and I know it's your site, but am afraid you got something completely wrong with my long-winded post here: It's in no way the STYLES that were extreme, advanced or anything, in fact most are very simplistic: Hide the background-image, or set all text to bold etc.
The problem is, no one of the "target" users will find it that way it's now put on kmext, and the developers who think it were for them, will feel fooled when they try those simple styles :-((

-------- disrupted -------
Web Development web-developing & design


an advanced collection of stylesheets(css) to enable the web-developer or just the regular user advanced css manipulation or better visibility for a website.
menu entry: (toolbar button)
extra notes: -
versions supported: 1.1.x - 1.5.x

ini-infotext: 1=a collection of userstyles for the css developer

What you described there is actually your updated "styles" macro: "Styles" is the one for "developers", and has an "advanced collection of styles", especially that mind-blowing aardvark-thing (that I could direly have needed for fiddling with some css-probs, sigh.) Frankly, I rather freaked when I saw that update and thought I can trash now all my own work *shock* grinning smiley But then looked at it closer and found that thankgod it's intended for completely different users - uff... cool smiley

So even though the 'inner architecture' of our macros may be very similar, the styles are not at all. The only thing that may be 'extreme' on StyleButtons here, is rather the attempt to make things as SIMPLE as possible for BEGINNERS, to quickly help visibility and to find their way around button-customizing, via that advanced menu and editor.

Please, if there's any chance, could we change it that way??
(inspired by the "invert colours" entry, which is really the closest to mine smiling smiley)

-------- siria -------
Enhancements: advanced browser & site manipulation

Style Buttons

quickly modify the font and colors of a webpage for better readability or according to personal preferences. Can also hide background-images, highlight links and indicate most missing images if they show no icons. Each style with own (optional) toolbar button. Special menus and help-file to facilitate style- and button-customizing for beginners.
Extra: Includes optionally an editor (SciTE) with syntax highlighting to easier manipulate own custom styles.

menu entry: View>Style Buttons. Or right-click in page. Or various toolbar buttons (optional).
extra notes: special editor (optional)
versions supported: 1.1.x (if you edit the kmm), 1.5.3 -
forum: http://kmeleon.sourceforge.net/forum/read.php?9,99433
ini-infotext: 1=a Enhance page readability by removing background images, change colors etc.

Generally I'd really find it most helpful to include links to an extension's forum post, if existing, at least for macros that are a little bigger smiling smiley That doesn't need much space or any translations on kmext, but helps greatly finding the right one without first having to install a bunch just for testing, so why not?

One little prob, seeing how that thing kept growing over and over while I thought for months it's nearly finished, I'm afraid it may yet keep changing a few times... *blush* But then I could post not only zip but also 7z-versions here, incl. your ini, for KEM offline install of the newest version...

Attachments: stylebuttons_menus2.gif (24.4 KB)   stylebuttons_menus3.gif (10.2 KB)  
Re: "Style Buttons" (optional with buttons by menu and special editor)
Posted by: siria
Date: December 18, 2009 11:49AM

You see?! It starts AGAIN... There I'm sitting suddenly thinking "but if people install a new version, their own customized styles will accidentally get overwritten, they'll get mad!" So I could just start over again growing that macro yet further, with finding ways to exclude custom-styles in the 7z, and create them only if someone clicks those "EDIT own style" buttons... Hmm... or better yet, at install make an automatic backup-copy of the whole styles folder... or better yet, make an automatic backup only of those styles that already exist when overwriting the macro... *SmokingHeadAgain*
That's how it went all those months, why it never got finished!!! LOL!

Re: "Style Buttons" (optional with buttons by menu and special editor)
Posted by: disrupted
Date: December 18, 2009 03:03PM

it's scary in a good way.. i mean quite adavnced for a first macro. i remember my first macro was a send link to getright(with a lot of missing semicolons)

they are very useful styles and it's extreme because it includes so many ones that cover all what;s need. it has been moved to enhancements with your description and don't worry about future updates..most users won't customise and if they do then it's their responsibility to do a backup but for convenience we can add an extra note explaining that the update will overwrite older ones and users should backup and add their modified sections to the update.

p.s "my" styles, i pinched them all from opera 10 tongue sticking out smiley

Re: "Style Buttons" (optional with buttons by menu and special editor)
Posted by: siria
Date: December 18, 2009 09:22PM

Thank You! smiling smiley Am really much happier now grinning smiley

An overwriting warning sure would make a lot of sense, IMO. There are so many people out there who have no clue what a zip file is, let alone 7z, and not even know what a "subfolder" might be. And even the more experienced might simply forget that their styles could be overwritten without any warning.

Hey, but for your first macro you sure didn't need several months of training to write it, and you sure produced a couple more than just a single one in that time In the beginning mine was quite simple too, just copied "Invert Colours" and changed the css-styles and their names, just couldn't post it then, because each time it was "nearly finished" yet more ideas of "must-have" gimmicks kept flowing and nagging and wouldn't let me, argh tongue sticking out smiley

By the way I wonder if it would be allowed to also add this thing here to the macros-list in the main wiki, but only with a link to this forum post, no own wiki-page? Can't impossibly post all that endless stuff in plain text, and this contains also a lot of other files, not just the kmm (="macro"). And can't find pictures in the other macro pages there. This layout sure has historical reasons, but no idea if it's meant to be kept that way in the future too, reserved for smaller-sized and kmm-only "macros", without images posted?

Re: "Style Buttons" (optional with buttons by menu and special editor)
Posted by: Doon
Date: December 19, 2009 02:36AM

Siria, first of all: congratulations on your creation (monster), I can see that you have poured a lot of time and thought into it and that you must have learned a lot along the way.

Secondly, I extracted the files to my K-Meleon folder and ran it without any further setup, everything I tried seemed to work well.

Lastly, I must confess that I am not a target user for this kind of extension so I'm not sure what else to say, but I wanted to try it and acknowledge your work. Having read your help files and tried many of the options you've provided I've certainly gained a greater insight into K-M and CSS possibilities. Thanks!

Re: "Style Buttons" (optional with buttons by menu and special editor)
Posted by: siria
Date: December 20, 2009 02:28PM

Thank you Doon smiling smiley
Nice to know it works on another computer too :-)

Re: "Style Buttons" (optional with buttons by menu and special editor)
Posted by: disrupted
Date: December 20, 2009 06:32PM

after the getright macro fiasco i spent lots of time on the macrolearning wiki and kko pages and using jamesd trainers they are exceptional in learning macro..also studying other macros helps a lot. you can add anything to the wiki just be careful not to delete other entries tongue sticking out smiley

Re: "Style Buttons" (optional with buttons by menu and special editor)
Posted by: panzer
Date: December 30, 2011 10:10AM

Siria, could this be used in Km somehow:

"If you spend your days in front of a computer monitor, color can be an important tool in the fight against fatigue and eye strain."

"The colors have been carefully picked for optimum contrast and legibility. Code highlighted using Solarized stands out and is easy to read and work with for hours.".

Edited 1 time(s). Last edit at 12/30/2011 10:11AM by panzer.

K-Meleon forum is powered by Phorum.