CSS selectors in web pages

Nico R. n-roeser at gmx.net
Wed Sep 15 08:04:59 PDT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jeroen Coumans wrote:

> Nico R. said the following on 13-09-2004 12:10:
>> 
>> My scripting abilities are very limited, too, and I usually do not
>> use client-side scripting at all, because I kind of hate it... ;-)
>> But I could try to create a client-side solution, and am willing to
>> spend a few spare minutes on it. Do you like me to give it a try?
> 
> It has no priority for me but I'll gladly accept whatever you come up
> with, thanks! Also, as long as it's valid Javascript and is compatible
> with all major browsers, it should be no problem integrating it into
> TWiki.

And here the magic comes... See attached patch. I only modified the
template page as an example; of course all pages have to be changed
accordingly.
I did not put in a noscript element. If you like one, add it yourself.

The code may still be a bit buggy, as I just quickly learned a bit of
DOM and ECMAScript/JavaScript to get this done. Hope it's all right.

I could not test this on many browsers, so you should do some testing
before committing anything.

Have fun with it!
- -- 
Nico
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFBSFogxI5uhYOGv4URAnJ3AJ9ImX/lkCtj2Y5ZdV3El3hXIRyYvwCgytcH
a4snxxQi12LcIlCeqMJsRk8=
=LbXD
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: styleswitcher-enhancement-1.patch
Type: text/x-diff
Size: 3057 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/website/attachments/20040915/02ce763f/attachment.patch>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: styleswitcher-enhancement-1.patch.asc
URL: <http://lists.linuxfromscratch.org/pipermail/website/attachments/20040915/02ce763f/attachment.asc>


More information about the website mailing list