[tw] Re: Changing TW colors

2012-04-19 Thread skye riquelme
Hi AllTodias

I came up with what I think is something similar. A tiddler has some
nice colores icones (Erics SetIconPlugin) which activate (when hit) a
bit o javascript that simply creates the color combinations in sliced
format (var text="|background|color|\n|text|othercolor..)and
then makes a tiddler called Color.which the StyleSheet is
reading...so I have to reload the StyleSheet...but thats simple
enough. Each colored icon creates a different set of colors in the
sliced format...and when clicked...simply rewrites the Color file

The localStorage thingy...is a part of HTML5...where you can store
parameters in the localStorage of the browser...a bit like cookies,
only the parameter values are available across windows ou tabs of the
browser.dont have to send values between TWS...for example dont
need to use [[open in new tab|otherFolder/
TWfile.html#txtParameter:parameterValue.]] if parameterValue
is set in localStorage its available in TWfile automatically --
PROVIDED the calling TW and receiving TW have the same browser address
- thats a heavy restriction sometimesbut often not.

I am findng setting and using localStorage, generally easier and more
useful that config.options.txt but its a personal thing!!!

Thanks for your suggestion

Skye


On 19 abr, 18:40, Tobias Beer  wrote:
> One way to do it would be to put something like this into your zzConfig:
>
> //shadow tiddler for styles
> config.shadowTiddlers.StyleSheetLocalStorage ='/*{{{*/\n'+
>         '.myClass {background-color:[[' + someJavascript(param) + ';;}\n'+
>         '/*}}}*/';
> store.addNotification("StyleSheetLocalStorage", refreshStyles);
>
> So essentially, this adds a shadow tiddler by the name of
> StyleSheetLocalStorage into which your localStorage thingy would have to be
> computed and which then is invoked via addNotification.
>
> Note, however that if you chose to overwrite this ShadowTiddler, you will
> lose the computed value.
>
> As I have no idea, what your localStoragy thingy is about, you might need
> to figure that part out yourself.
>
> Cheers, Tobias.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to tiddlywiki@googlegroups.com.
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.



[tw] Re: Changing TW colors

2012-04-19 Thread Tobias Beer
One way to do it would be to put something like this into your zzConfig:

//shadow tiddler for styles
config.shadowTiddlers.StyleSheetLocalStorage ='/*{{{*/\n'+
'.myClass {background-color:[[' + someJavascript(param) + ';;}\n'+
'/*}}}*/';
store.addNotification("StyleSheetLocalStorage", refreshStyles);


So essentially, this adds a shadow tiddler by the name of 
StyleSheetLocalStorage into which your localStorage thingy would have to be 
computed and which then is invoked via addNotification.

Note, however that if you chose to overwrite this ShadowTiddler, you will 
lose the computed value.

As I have no idea, what your localStoragy thingy is about, you might need 
to figure that part out yourself.

Cheers, Tobias.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/tiddlywiki/-/4IGFoybOAkIJ.
To post to this group, send email to tiddlywiki@googlegroups.com.
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.



[tw] Re: Changing TW colors

2012-04-19 Thread Tobias Beer
One way to do it would be to put something like this into your zzConfig:

//shadow tiddler for styles
config.shadowTiddlers.StyleSheetCustom ='/*{{{*/\n'+
'.myClass {background-color:[[' + someJavascript(param) + ';;}\n'+
'/*}}}*/';
store.addNotification("StyleSheetLinkify", refreshStyles);


So essentially, this adds a shadow tiddler by the name of StyleSheetCustom 
into which your localStorage thingy would have to be computed and which 
then is invoked via addNotification.

Note, however that if you chose to overwrite this ShadowTiddler, you will 
lose the computed value.

As I have no idea, what your localStoragy thingy is about, you might need 
to figure that part out yourself.

Cheers, Tobias.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/tiddlywiki/-/GdtS-rdClVwJ.
To post to this group, send email to tiddlywiki@googlegroups.com.
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.