## A Simple TiddlyWiki Macro

Another item from the Great Bucket of Random Things:

The below Javascript will add a simple macro to TiddlyWiki to that substitutes <<define yourwordhere>> for a link to google searching for that term. Put the phrase in quotes if you want to include spaces (e.g. <<define “your phrase here”>>). Custom links like this are trivial, but can be a very useful shorthand.

Just search for “// Macro definitions” in the TiddlyWiki HTML to find where to inline your macro.

// ---------------------------------------------------------------------------------
// Macro definitions
// ---------------------------------------------------------------------------------

config.macros.define = {};
config.macros.define.handler = function(place,macroName,params)
{
}