1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-13 21:34:51 +00:00
TiddlyWiki5/test/tiddlywiki.2.6.5/source/tiddlywiki.com/tiddlywiki-com/TiddlyBookmarklets.tid
2011-12-03 11:53:29 +00:00

16 lines
1.9 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

title: TiddlyBookmarklets
modifier: jermolene
created: 20110211110707
modified: 20111020135127
tags: community help
creator: psd
[[Bookmarklets|http://en.wikipedia.org/wiki/Bookmarklet]] can be useful for TiddlyWiki hackers. They are browser bookmarks that contain embedded ~JavaScript that can reach into the currently loaded TiddlyWiki page to manipulate them and extract data.
Drag these links to your bookmark/favourites bar, or right click on them and choose "add to bookmarks" or "add to favourites":
* [[Scrub shadow tiddlers|javascript:(function(){if(window.version&&window.version.title=='TiddlyWiki'){for(var s in config.shadowTiddlers){store.removeTiddler(s);}refreshDisplay();}})()]] - deletes any overridden shadow tiddlers, reverting them to their default values. Handy when youve gone mad with PageTemplate customisations and your ~TiddlyWiki document wont display properly
* [[Scrub tiddler fields|javascript:(function(){if(window.version&&window.version.title=='TiddlyWiki'){store.forEachTiddler(function(title,tiddler){tiddler.fields={};});refreshDisplay();}})()]] - all the extended fields from a ~TiddlyWiki document, including that pesky “changecount” field
* [[Rescue raw TiddlyWiki content|javascript:(function(){if(window.version&&window.version.title=='TiddlyWiki'){var w=window.open();w.document.open();w.document.write('<html><body><pre>');w.document.write(store.allTiddlersAsHtml().htmlEncode());w.document.write('</pre></body></html>');w.document.close();}})()]] - opens a new window containing the raw content of a ~TiddlyWiki. Handy when youve inadvertently been editing an online version of TiddlyWiki that isnt letting you save changes in the usual way
If you're creating your own bookmarklets, this [[editor|http://subsimple.com/bookmarklets/jsbuilder.htm]] and these [[tips|http://subsimple.com/bookmarklets/tips.asp]] are useful resources.