Thanks Jeremy.

On Wednesday, March 12, 2014 11:33:49 PM UTC+1, Jeremy Ruston wrote:
>
> Hi Ton
>
> Oops, my apologies, I should have remembered your code. I've gone ahead 
> and implemented the tw-home message for 5.0.9:
>
>
> https://github.com/Jermolene/TiddlyWiki5/commit/50cf9678cb469e443e220b063e2355c844e417e7
>
> Best wishes
>
> Jeremy
>
>
>
> On Wed, Mar 12, 2014 at 6:52 PM, Ton Gerner <[email protected]<javascript:>
> > wrote:
>
>> Hi Jeremy,
>>
>> Don't shoot the messenger ;-)
>>
>> Quite a long time ago (November 3, 2013 to be precise), Dave Gifford 
>> asked for a Home button [1]
>> Stephan Hadrek found the code was already present in startup.js and asked 
>> you for a separate function.
>> You planned to add a message "tw-home" to be invoked by <$button 
>> message="tw-home">Home</$button>.
>> In the meantime I used the code for a Home button in my guides.
>>
>> And so Matabele - who read my guides as you can see [2] - copied the code 
>> over here.
>>
>> May be time to implement the "tw-home" message?
>> Otherwise I do not have a working Home button anymore in TW5.0.9 ;-)
>>
>> Cheers,
>>
>> Ton
>>
>> [1] 
>> https://groups.google.com/forum/#!msg/tiddlywiki/nsECiXqk7fw/dPZYISdoOCsJ
>> [2] http://wills.tiddlyspot.com/
>>
>>
>> On Wednesday, March 12, 2014 5:40:21 PM UTC+1, Jeremy Ruston wrote:
>>
>>> Hi Matabele
>>>
>>> The pattern of using inline JavaScript handlers is not recommended for 
>>> TiddlyWiki5.
>>>
>>> There are several reasons:
>>>
>>> * It doesn't work well with TW5's refresh mechanism, which relies on 
>>> being able to regenerate any portion of the DOM as required; this 
>>> frequently causes inline handlers to be re-executed at unexpected times 
>>> (see http://tiddlywiki.com/static/TiddlyWiki%2520for%2520Developers.html
>>> )
>>> * It mixes TW5 version-specific JavaScript with user content
>>> * In multiuser environments there is a security risk to importing or 
>>> viewing tiddlers you didn't author if they can have JavaScript in them
>>>
>>> Instead, one should write widgets or other custom modules that 
>>> encapsulate the required JavaScript.
>>>
>>> Blacklisting the "on*" attributes on HTML elements has been on my list 
>>> for a while, so I've implemented it for 5.0.9:
>>>
>>> https://github.com/Jermolene/TiddlyWiki5/commit/
>>> d0caf21b2df9fda9800eb30489003a87cafb1277
>>>  
>>> Best wishes
>>>
>>> Jeremy.
>>>
>>>
>>>
>>>
>>> On Wed, Mar 12, 2014 at 3:20 PM, Matabele <[email protected]> wrote:
>>>
>>>> Hi
>>>>
>>>> For TW5 use this code in $:/SiteTitle
>>>>
>>>>  <span title="Home"><button message="tw-home" class="btn-invisible" 
>>>> onclick="
>>>> var defaultTiddlersTitle = '$:/DefaultTiddlers',
>>>>     defaultTiddlersTiddler = $tw.wiki.getTiddler(defaultTiddlersTitle),
>>>>     defaultTiddlers = [];
>>>> if(defaultTiddlersTiddler) {
>>>>     defaultTiddlers = $tw.wiki.filterTiddlers(
>>>> defaultTiddlersTiddler.fields.text);
>>>> }
>>>> var storyTitle = '$:/StoryList',
>>>>     story = [];
>>>> for(var t=0; t
>>>> <defaultTiddlers.length; t++) {
>>>>     story[t] = defaultTiddlers[t];
>>>> }
>>>> $tw.wiki.addTiddler({title: storyTitle, text: '', list: story},$tw.wiki
>>>> .getModificationFields());
>>>> return false;
>>>> ">My ~TiddlyWiki</button></span>
>>>>
>>>>
>>>>
>>>>
>>>> Other buttons can also be added to the Site Title (as can similar 
>>>> buttons be added into the Site Subtitle.) I use this fullscreen button 
>>>> after my title (utilising fontawesome icons and the fullscreen plugin):
>>>>
>>>>
>>>> <span title="Full screen"><$button message="tw-full-screen" 
>>>> class="btn-invisible"> <i class="fa fa-html5 silver"></i></$button>
>>>> </span>
>>>>
>>>>
>>>>
>>>> regards
>>>>
>>>>
>>>> On Wednesday, March 5, 2014 7:52:48 PM UTC+2, Bill Mullen wrote:
>>>>
>>>>> I was looking for a way to re-display my DefaultTiddlers - mostly 
>>>>> after a search because the search feature was closing all the open 
>>>>> tiddlers 
>>>>> before displaying the results.
>>>>>
>>>>> In my search, Morris Gray included some code in the following thread:
>>>>>
>>>>> https://groups.google.com/forum/#!searchin/TiddlyWiki/Defaul
>>>>> tTiddler/tiddlywiki/k3qdZ64aARQ/PpTeG7swBxkJ
>>>>>
>>>>> First off, thank you Morris! 
>>>>>
>>>>> I used Morris' code in my SiteTitle tiddler as such so that clicking 
>>>>> on the site title will close all open tiddlers and display the default 
>>>>> tiddlers.
>>>>>
>>>>> <html><a href="javascript:void(0)" onclick="story.closeAllTiddlers
>>>>> ();story.displayTiddlers(null,store.getTiddlerText
>>>>> ('DefaultTiddlers').readBracketedList())"
>>>>> ><span title="Display default tiddlers" style="cursor:pointer; color: 
>>>>> white;">My Site Title</span></a></html>
>>>>>
>>>>>
>>>>> Just thought I would share a way to use Morris' code
>>>>>
>>>>>  -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "TiddlyWiki" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to [email protected].
>>>> To post to this group, send email to [email protected].
>>>>
>>>> Visit this group at http://groups.google.com/group/tiddlywiki.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>>
>>> -- 
>>> Jeremy Ruston
>>> mailto:[email protected]
>>>  
>>
>
>
> -- 
> Jeremy Ruston
> mailto:[email protected] <javascript:>
>  

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Reply via email to