Tiddly W;nks! is the site where I post my plugins for TiddlyWiki.\n\nThe semicolon is supposed to look like a wink, like in the emoticon @@ ; ) @@. Get it?\n\nIt was created on 3 October 2005 for my first plugin, [[Minesweeper]].\n\n[[More about me|Daniel Baird]]\n[[More about TiddlyWiki|TiddlyWiki]]
/***\nJust some bits and pieces\n***/\n//{{{\nconfig.messages.messageClose.text = "X"; // default is "close"\nconfig.views.wikified.defaultText = ""; // default is "The tiddler '%0' doesn't yet exist. Double-click to create it"\nconfig.options.chkHttpReadOnly = false; // Enable editing so that visitors can experiment with it\n//}}}
/***\n|''Name:''|Corner|\n|''Version:''|0.1 (Oct 2005)|\n|''Source:''|Tiddly W;nks (http://www.bur.st/~blazeoz/tiddlywinks/)|\n|''Author:''|[[Daniel Baird]]|\n|''Type:''|Macro|\n!Description\n\nJust testing a corner made out of fat borders..\n\n<<corner>>\n\n!Notes\n* Not very useful.\n\n!Revision History\n* 0.1 (Oct-05)\n** first go\n\n***/\n/*{{{*/\n\nversion.extensions.corner = {major: 0, minor: 1, revision: 0};\n\nconfig.macros.corner = {};\n\nconfig.macros.corner.handler = function(place,macroName,params) {\n var pointing = params[0];\n var inColor = params[1];\n var outColor = params[2];\n var width = params[3];\n var height = params[4];\n\n if (pointing == undefined) pointing = 'nw';\n if (width == undefined) width = 3;\n if (height == undefined) height = width;\n if (inColor == undefined) inColor = '#003399';\n if (outColor == undefined) outColor = '#fff';\n\n var id = 'cornerhere';\n\n createTiddlyElement(place, 'div', id, null, 'corner here');\n var corner = new Corner(id);\n corner.drawCorner('nw', width, height, inColor, outColor);\n corner.drawCorner('ne', width, height, inColor, outColor);\n}\n// =======================================================================\nfunction Corner(id) {\n this.version = '0.1 alpha';\n this.id = id;\n return this;\n}\n// -----------------------------------------------------------------------\nCorner.prototype.makeBorder = function(elem, border, width, color) {\n var whichborder = border.substr(0,1).toUpperCase() + border.substr(1).toLowerCase();\n elem.style['border'+whichborder+'Style'] = 'solid';\n elem.style['border'+whichborder+'Width'] = width+'em';\n elem.style['border'+whichborder+'Color'] = color;\n}\n// -----------------------------------------------------------------------\nCorner.prototype.drawCorner = function(pointing, width, height, inColor, outColor) {\n var inwidth = width * 0.75;\n var outwidth = width - inwidth;\n var inheight = height * 0.75;\n var outheight = height - inheight;\n\n if (pointing.substr(0,1) == 'n') {\n var bottomw = inheight;\n var bottomc = inColor;\n var topw = outheight;\n var topc = outColor;\n } else {\n var bottomw = outheight;\n var bottomc = outColor;\n var topw = inheight;\n var topc = inColor;\n }\n\n if (pointing.substr(1,1) == 'e') {\n var leftw = inwidth;\n var leftc = inColor;\n var rightw = outwidth;\n var rightc = outColor;\n } else {\n var leftw = outwidth;\n var leftc = outColor;\n var rightw = inwidth;\n var rightc = inColor;\n }\n\n var cnr = document.createElement('div');\n cnr.style.width = 0;\n cnr.style.height = 0;\n cnr.style.cssFloat = 'left';\n// cnr.style.display = 'block';\n this.makeBorder(cnr, 'top', topw, topc);\n this.makeBorder(cnr, 'right', rightw, rightc);\n this.makeBorder(cnr, 'bottom', bottomw, bottomc);\n this.makeBorder(cnr, 'left', leftw, leftc);\n\n document.getElementById(this.id).appendChild(cnr);\n}\n// =======================================================================\n/*}}}*/\n
Daniel is me -- the author of the plugins you can download from this site.\n\nI'm always happy to hear any feedback, so if you have problem, tips, or suggestions, please get in touch with me via email: ~DanielBaird - at - gmail - com.\n\nIf you have a general TiddlyWiki question, there is also a [[TiddlyWiki Google Group|http://groups.google.com/group/TiddlyWiki]] where TiddlyWiki users and developers congregate.
[[Play Minesweeper!]]
/***\n|''Name:''|Dice|\n|''Version:''|0.5 (21 Oct 2005)|\n|''Source:''|Tiddly W;nks (http://danielbaird.com/tiddlywinks/)|\n|''Author:''|[[Daniel Baird]]|\n|''Type:''|Macro|\n!Description\nTell it what dice you want, and it'll let you roll them.\n\n!Syntax/Example usage\n\n{{{<<dice>>}}} for 3d6\n\n{{{<<dice }}}//{{{specifier}}}//{{{ [}}}//{{{options}}}//{{{]>>}}} where specifier is something like 3d6, 1d4+1, 2d10-5\n\n{{{<<dice fudge [}}}//{{{options}}}//{{{]>>}}} will roll 3 fudge dice (a fudge die gives -1, 0, or +1)\n\noptions can be zero or more of the following:\n\n* show:eachface\n** shows the face of each die rolled, then the total (not yet implemented)\n* show:eachroll\n** shows the number on each die rolled, then the total (default)\n* show:result\n** shows just the total result of the roll\n* initialroll:yes\n** do a roll when initially displayed\n* initialroll:no\n** don't roll until the user says so (default)\n* rollby:click\n** user clicks anywhere on the diceroller area to roll\n* rollby:link\n** user clicks an underlined link to roll (default)\n* rollby:button\n** user clicks a button to roll\n\neg:\n\n{{{<<dice>>}}}\n<<dice>>\n\n{{{<<dice 3d6+2 rollby:button>>}}}\n<<dice 3d6+2 rollby:button>>\n\n{{{<<dice fudge initialroll:yes rollby:click>>}}}\n<<dice fudge initialroll:yes rollby:click>>\n\n\n!Notes\n* much changing during this 0.5 version.\n\n!Revision History\n* 0.1\n** first release\n* 0.2\n** changed the corners to slightly prettier ugly text chars\n** finally got rid of the borders\n** got rid of heading\n** added 'Fudge' mode\n* 0.3 (5 Oct 2005)\n** fixed the problem with multiple dice rollers\n* 0.31 (12 Oct 2005)\n** worked out how to use a closure as a event handler, which means that the code added in 0.3 could be made a lot simpler.\n* 0.5 (21 Oct 2005)\n** aiming at getting a whole rewrite done. much progress!.\n\n***/\n/*{{{*/\n// =======================================================================\nversion.extensions.dice = {major: 0, minor: 5, revision: 0};\n\nconfig.macros.dice = {};\n\nconfig.macros.dice.handler = function(place,macroName,params) {\n\n var rolldesc = params[0];\n if (rolldesc == undefined) rolldesc = '3d6';\n\n var options = '';\n if (params.length > 1) {\n params.shift();\n options = params.join(' ');\n }\n\n var thisDiceRoller = new DiceRoller();\n createTiddlyElement(place, 'div', thisDiceRoller.id, null, 'If you see this, DiceRoller is broken. Let Daniel know (DanielBaird at gmail dot com).');\n thisDiceRoller.newDice(rolldesc, options);\n}\n// =======================================================================\nfunction DiceRoller() {\n this.idprefix = 'dice';\n this.version = '0.5 beta';\n this.id = this.idprefix + DiceRoller.prototype.nextid;\n DiceRoller.prototype.nextid++;\n return this;\n}\n// -----------------------------------------------------------------------\nDiceRoller.prototype.nextid = 0;\n// -----------------------------------------------------------------------\nDiceRoller.prototype.newDice = function(rolldesc, options) {\n\n this.error = null;\n this.initialroll = false;\n this.display = 'eachroll';\n this.rolltag = 'roll';\n this.rollagaintag = 'roll again';\n this.rollby = 'link';\n this.parseDesc(rolldesc);\n this.parseOpts(options);\n if (this.initialroll) this.rollDice();\n this.drawRoller();\n// ^^^^^^^^^^^^^ new stuff above.. ^^^^^^^^^^^^^\n// this.rolls = rolls;\n\n// this.resultDisplay = 'dice';\n// if (resultDisplay != null) this.resultDisplay = resultDisplay;\n\n// this.resultSystem = 'sum';\n// if (resultSystem != null) this.resultSystem = resultSystem;\n\n// this.sides = 6;\n// this.createDice();\n// this.roll();\n}\n// -----------------------------------------------------------------------\nDiceRoller.prototype.parseDesc = function(desc) {\n this.rollstr = desc;\n desc = desc.toLowerCase();\n this.dicetype = 'standard';\n this.adjuster = null;\n if (desc == 'fudge') {\n // 'fudge' system: 3d3, where the d3 gives -1, 0 or +1\n this.dicetype = 'fudge';\n this.dicesides = 3;\n this.rollcount = 3;\n } else {\n // normal system: eg 3d6+2\n var reg = /(\sd+)d(\sd+)(\s+(\sd+)|-(\sd+))?/;\n var info = desc.match(reg);\n this.rollcount = parseInt(info[1]);\n this.dicesides = parseInt(info[2]);\n this.adjuster = parseInt(info[3]);\n if ( isNaN(this.adjuster) ) this.adjuster = 0;\n }\n}\n// -----------------------------------------------------------------------\nDiceRoller.prototype.parseOpts = function(options) {\n this.optstr = options;\n options = ' ' + options + ' ';\n if (options.indexOf(' show:eachface ') != -1) this.display = 'eachface';\n if (options.indexOf(' show:eachroll ') != -1) this.display = 'eachroll';\n if (options.indexOf(' show:result ') != -1) this.display = 'result';\n\n if (options.indexOf(' initialroll:yes ') != -1) this.initialroll = true;\n if (options.indexOf(' initialroll:no ') != -1) this.initialroll = false;\n\n if (options.indexOf(' rollby:click ') != -1) this.rollby = 'click';\n if (options.indexOf(' rollby:link ') != -1) this.rollby = 'link';\n if (options.indexOf(' rollby:button ') != -1) this.rollby = 'button';\n}\n// -----------------------------------------------------------------------\nDiceRoller.prototype.createDice = function() {\n this.results = new Array(this.rolls);\n this.result = 0;\n this.showDice();\n}\n// -----------------------------------------------------------------------\nDiceRoller.prototype.drawRoller = function() {\n var node = document.getElementById(this.id);\n if (this.display == 'eachface') node.innerHTML = this.drawRollerEachFace();\n if (this.display == 'eachroll') node.innerHTML = this.drawRollerEachRoll();\n if (this.display == 'result') node.innerHTML = this.drawRollerResult();\n\n // getClickHandler() is a function that returns a function.. JS is sweet huh\n if (this.rollby == 'click') {\n node.onclick = this.getClickHandler();\n } else {\n document.getElementById(this.id + '_roll').onclick = this.getClickHandler();\n }\n /*\n var html = '';\n\n if (this.display == 'eachface')\n\n html += '<table class="diceroller">';\n html += '<tr>';\n\n if (this.resultDisplay == 'text') {\n html.push('<td>You rolled ');\n }\n if (this.resultDisplay != 'textsummary') {\n var separator = '';\n for (var roll = 0; roll < this.rolls; roll++) {\n html.push( separator + this.drawDie(roll) );\n if (this.resultDisplay == 'text') separator = ', ';\n }\n html.push('<td>');\n }\n if (this.resultSystem == 'fudge') {\n var resprefix = '';\n if (this.result > 0) resprefix = '+';\n html.push('Result is ' + resprefix + this.result + '.<br />Click to roll again.</td>');\n } else {\n html.push('<td>'+this.rolls+'d'+this.sides+': you rolled ' + this.result + '.<br />Click to roll again.</td>');\n }\n\n html += '</tr></table>';\n node.innerHTML = html;\n */\n}\n// -----------------------------------------------------------------------\nDiceRoller.prototype.drawRollerResult = function() {\n var str = '';\n str += 'Rolling';\n str += ((this.dicetype == 'fudge')?(':'):(' ' + this.rollstr + ':'));\n if (this.result != undefined) {\n str += 'You rolled <strong>';\n str += ((this.dicetype == 'fudge')?(this.addSign(this.result)):(this.result));\n str += '</strong>.';\n }\n str += this.makeRollTrigger();\n return str;\n}\n// -----------------------------------------------------------------------\nDiceRoller.prototype.drawRollerEachRoll = function() {\n var str = '';\n str += 'Rolling';\n str += ((this.dicetype == 'fudge')?(':'):(' ' + this.rollstr + ':'));\n if (this.result != undefined) {\n str += ' You rolled ';\n var joiner = '';\n for (var r = 0; r < this.rollcount; r++) {\n str += joiner + ((this.dicetype == 'fudge')?(this.addSign(this.results[r])):(this.results[r]));\n joiner = ', ';\n }\n str += ' totalling <strong>';\n str += ((this.dicetype == 'fudge')?(this.addSign(this.result)):(this.result));\n str += '</strong>.';\n }\n str += this.makeRollTrigger();\n return str;\n}\n// -----------------------------------------------------------------------\nDiceRoller.prototype.addSign = function(num) {\n return ( ((parseInt(num) > 0)?('+'):('')) + (num) );\n}\n// -----------------------------------------------------------------------\nDiceRoller.prototype.makeRollTrigger = function() {\n var tag = ((this.result == undefined)?(this.rolltag):(this.rollagaintag));\n if (this.rollby == 'click') return ' Click to ' + tag + '.';\n if (this.rollby == 'link') return ' <a style="text-decoration: underline" href="#" id="' + this.id + '_roll">' + tag + '</a>';\n if (this.rollby == 'button') return ' <button id="' + this.id + '_roll">' + tag + '</button>';\n}\n// -----------------------------------------------------------------------\nDiceRoller.prototype.drawDie = function(roll) {\n var html = new Array();\n\n if (this.resultDisplay == 'text') {\n if (this.resultSystem == 'fudge' && this.results[roll] > 0) html.push('+');\n html.push(this.results[roll]);\n } else {\n html.push('<td class="die">');\n\n //there are seven possible dot positions\n var dots = Array();\n for (var dot = 0; dot < 7; dot++) {\n dots.push('&nbsp;');\n }\n if ( this.results[roll] ) {\n if (this.results[roll] > 1) dots[0] = 'O';\n if (this.results[roll] > 3) dots[1] = 'O';\n if (this.results[roll] == 6) dots[2] = 'O';\n if (this.results[roll]%2 == 1) dots[3] = 'O';\n if (this.results[roll] == 6) dots[4] = 'O';\n if (this.results[roll] > 3) dots[5] = 'O';\n if (this.results[roll] > 1) dots[6] = 'O';\n }\n var pipe = '|';\n var space = '&nbsp;';\n if (this.resultDisplay == 'dice') {\n html.push(',-----.<br />');\n html.push(pipe + space + dots[0] + space + dots[1] + space + pipe + '<br />');\n html.push(pipe + space + dots[2] + dots[3] + dots[4] + space + pipe + '<br />');\n html.push(pipe + space + dots[5] + space + dots[6] + space + pipe + '<br />');\n html.push('`-----\s'<br />');\n } else if (this.resultDisplay == 'compact') {\n html.push(dots[0] + space + dots[1] + '<br />');\n html.push(dots[2] + dots[3] + dots[4] + '<br />');\n html.push(dots[5] + space + dots[6] + '<br />');\n }\n html.push('</td>');\n }\n return html.join('');\n}\n// -------------------------------------------------------------------\nDiceRoller.prototype.rollDice = function() {\n this.result = this.adjuster;\n this.results = new Array(this.rollcount);\n for (var roll = 0; roll < this.rollcount; roll++) {\n this.results[roll] = Math.floor((this.dicesides)*Math.random())+1;\n if (this.dicetype == 'fudge') {\n this.results[roll] -= 2;\n }\n this.result += this.results[roll];\n }\n this.drawRoller();\n}\n// -----------------------------------------------------------------------\nDiceRoller.prototype.getClickHandler = function() {\n // trickey bit.. first make a local var that references the\n // current dice roller object, then return an anonymous function\n // that calls that object's roll() method. woot for closures!\n var thisroller = this;\n return function(e) {\n thisroller.rollDice();\n return false;\n };\n}\n// =======================================================================\nsetStylesheet(\n ".viewer table.diceroller, .viewer table.diceroller tr { "+\n "border: none;" +\n "} \sn"+\n\n ".viewer table.diceroller tr td { "+\n "border: none; " +\n "} \sn"+\n\n ".viewer table.diceroller td.die { "+\n "padding: 0.5em; " +\n "font-family: monospace; " +\n "line-height: 0.95em; " +\n "} \sn"+\n\n "",\n "DiceRoller");\n\n/*}}}*/
<!---\n| Name:|~TagglyTaggingEditTemplate |\n| Version:|1.1 (12-Jan-2006)|\n| Source:|http://simonbaird.com/mptw/#TagglyTaggingEditTemplate|\n| Purpose:|See TagglyTagging for more info|\n| Requires:|You need the CSS in TagglyTaggingStyles to make it look right|\n--->\n<!--{{{-->\n<div class="toolbar" macro="toolbar +saveTiddler closeOthers cancelTiddler deleteTiddler"></div>\n<div class="title" macro="view title"></div>\n<div class="editLabel">Title</div><div class="editor" macro="edit title"></div>\n<div class="editLabel">Tags</div><div class="editor" macro="edit tags"></div>\n<div class="editorFooter"><span macro="message views.editor.tagPrompt"></span><span macro="tagChooser"></span></div>\n<div class="editor" macro="edit text"></div>\n<br/>\n<!--}}}-->
Dice Roller allows you to select the 'Fudge' scoring system.\n\n{{{<<dice fudge>>}}}\n<<dice fudge>>\nGet the [[Dice Roller]] plugin for your TiddlyWiki
/***\n|''Name:''|Grid|\n|''Version:''|0.1 (Oct 2005)|\n|''Source:''|Tiddly W;nks (http://www.bur.st/~blazeoz/tiddlywinks/)|\n|''Author:''|[[Daniel Baird]]|\n|''Type:''|Macro|\n!Description\n\nJust testing a grid..\n\n<<grid 30 10 10>>\n\n!Notes\n* Not very useful.\n\n!Revision History\n* 0.1 (Oct-05)\n** first go\n\n***/\n/*{{{*/\n\nversion.extensions.grid = {major: 0, minor: 1, revision: 0};\n\nconfig.macros.grid = {};\n\nconfig.macros.grid.handler = function(place,macroName,params) {\n var width = params[1];\n var height = params[0];\n var zoom = params[2];\n var options = params[3];\n var realoptions = '';\n\n if (width == undefined) width = 30;\n if (height == undefined) height = width;\n if (zoom == undefined) zoom = 8;\n if (options == undefined) realoptions = 'resize';\n if (options == undefined && zoom > 2) realoptions = realoptions + ' gridlines';\n\n var aGrid = gridList.newGrid();\n\n createTiddlyElement(place,'div',aGrid.id,null,'If you see this, Grid is broken. Let Daniel know (DanielBaird at gmail dot com).');\n aGrid.newGrid(width, height, zoom, realoptions);\n}\n// =======================================================================\nfunction GridList() {\n this.prefix = 'grid';\n this.count = 0;\n this.list = {};\n return this;\n}\n// -----------------------------------------------------------------------\nGridList.prototype.newGrid = function() {\n var newid = this.prefix+this.count;\n this.list[newid] = new Grid(newid);\n this.count++;\n return this.list[newid];\n}\n// -----------------------------------------------------------------------\nGridList.prototype.handleClick = function(e) {\n if (!e) var e = window.event;\n var node = resolveTarget(e);\n var goodid = new RegExp('^'+gridList.prefix+'\s\sd+$');\n while ( ( !node.id || !goodid.test(node.id) ) && node.tagName.toUpperCase() != 'BODY' ) {\n node = node.parentNode;\n }\n if (node.tagName.toUpperCase() != 'BODY') {\n gridList.list[node.id].handleClick(e);\n }\n}\n// =======================================================================\nfunction Grid(id) {\n this.version = '0.1 alpha';\n this.id = id;\n return this;\n}\n// -----------------------------------------------------------------------\nGrid.prototype.newGrid = function(height, width, zoom, options) {\n this.height = height;\n this.width = width;\n this.zoom = zoom;\n\n options = ' ' + options + ' ';\n this.options = {};\n this.options['gridlines'] = (options.indexOf(' gridlines ') != -1);\n this.options['resize'] = (options.indexOf(' resize ') != -1);\n\n this.startGrid();\n}\n// -----------------------------------------------------------------------\nGrid.prototype.startGrid = function() {\n\n this.grid = new Array();\n\n // create the squares\n for (var x = 0; x < this.height; x++) {\n var row = new Array();\n for (var y = 0; y < this.width; y++) {\n var red = Math.floor((255)*Math.random())+1;\n var green = Math.floor((255)*Math.random())+1;\n var blue = Math.floor((255)*Math.random())+1;\n var sel = (1 == Math.floor((10)*Math.random())+1);\n row.push( {r:red, g:green, b:blue, selected: sel} );\n }\n this.grid.push(row);\n }\n this.message = 'not much happening yet.';\n this.showGrid();\n}\n// -----------------------------------------------------------------------\nGrid.prototype.showGrid = function() {\n\n var node = document.getElementById(this.id);\n var html = new Array();\n\n html.push('<table class="grid">');\n html.push('<tr>');\n if (this.options.resize) html.push('<td></td><td></td>');\n html.push('<td class="info" colspan="'+this.width+'">Grid '+this.version+'</td>');\n if (this.options.resize) html.push('<td></td><td></td>');\n html.push('</tr>');\n if (this.options.resize) {\n html.push('<tr><td></td><td></td><td id="'+this.id+'_more_top" class="button" colspan="'+this.width+'">+</td><td></td><td></td></tr>');\n html.push('<tr><td></td><td></td><td id="'+this.id+'_less_top" class="button" colspan="'+this.width+'">-</td><td></td><td></td></tr>');\n }\n for (var x = 0; x < this.height; x++) {\n html.push('<tr>');\n if (this.options.resize && x == 0) {\n html.push('<td id="'+this.id+'_more_left" class="button" rowspan="'+this.height+'">+</td>');\n html.push('<td id="'+this.id+'_less_left" class="button" rowspan="'+this.height+'">-</td>');\n }\n for (var y = 0; y < this.width; y++) {\n html.push( this.makeSquare(x,y) );\n }\n if (this.options.resize && x == 0) {\n html.push('<td id="'+this.id+'_less_right" class="button" rowspan="'+this.height+'">-</td>');\n html.push('<td id="'+this.id+'_more_right" class="button" rowspan="'+this.height+'">+</td>');\n }\n html.push('</tr>');\n }\n if (this.options.resize) {\n html.push('<tr><td></td><td></td><td id="'+this.id+'_less_bot" class="button" colspan="'+this.width+'">-</td><td></td><td></td></tr>');\n html.push('<tr><td></td><td></td><td id="'+this.id+'_more_bot" class="button" colspan="'+this.width+'">+</td><td></td><td></td></tr>');\n }\n html.push('<tr>');\n if (this.options.resize) html.push('<td></td><td></td>');\n html.push('<td class="info" colspan="'+this.width+'">'+this.message);\n html.push('<small>');\n html.push('<br />' + this.height + ' x ' + this.width);\n html.push('</small>');\n html.push('</td>');\n if (this.options.resize) html.push('<td></td><td></td>');\n html.push('</tr>');\n html.push('</table>');\n node.innerHTML = html.join('');\n node.onclick = gridList.handleClick;\n}\n// -----------------------------------------------------------------------\nGrid.prototype.makeSquare = function(x,y) {\n var sq = this.grid[x][y];\n var html = new Array();\n\n var padding = '0';\n if (this.options.gridlines) padding = '1px';\n\n var bordercolor = '#fff';\n if (sq.selected) bordercolor = '#f00';\n\n html.push('<td style="background-color:'+bordercolor+'; padding:'+padding+'">');\n html.push('<div style="margin:0; padding:0; width:'+this.zoom+'px; height:'+this.zoom+'px; background-color:rgb('+sq.r+','+sq.g+','+sq.b+')"></div>');\n html.push('</td>');\n return html.join('');\n}\n// -------------------------------------------------------------------\nGrid.prototype.clickSquare = function(cx,cy,modifier) {\n // don't know what\n}\n// -------------------------------------------------------------------\nGrid.prototype.handleClick = function(e) {\n // work out which cell was clicked\n if (!e) var e = window.event;\n var str = resolveTarget(e).id;\n if (str && str != undefined) {\n if (str == this.id + '_more_left') {\n } else {\n var cx = parseInt(str.substr( str.indexOf('x-')+2 ));\n var cy = parseInt(str.substr( str.indexOf('y-')+2 ));\n if ( !isNaN(cx) && !isNaN(cy) ) {\n this.clickSquare(cx,cy,(e.altKey || e.shiftKey || e.ctrlKey));\n }\n }\n }\n}\n// -----------------------------------------------------------------------\n// for the event handling to work, we need a global list\nvar gridList = new GridList();\n// -----------------------------------------------------------------------\n\nsetStylesheet(\n ".viewer .grid { "+\n "border: none; "+\n "border-collapse: collapse; "+\n "border-spacing: 0px; "+\n "} \sn"+\n\n ".viewer .grid tr, .viewer .grid td { "+\n "border: none; "+\n "cursor: default; "+\n "padding: 0; "+\n "} \sn"+\n\n ".viewer .grid td.info { "+\n "width: auto; "+\n "padding: 0.2em; "+\n "} \sn"+\n\n ".viewer .grid td.button { "+\n "width: auto; "+\n "text-align: center; "+\n "vertical-align: center; "+\n "padding: 0.2em; "+\n "border: 1px solid #999; "+\n "border-left: 1px solid #ddd; "+\n "border-top: 1px solid #ddd; "+\n "background: #fff;"+\n "} \sn"+\n\n "",\n "Grid");\n\n/*}}}*/\n
/***\nTo use, add {{{[[HorizontalMainMenuStyles]]}}} to your StyleSheet tiddler, or you can just paste the CSS in directly. See also HorizontalMainMenu and PageTemplate.\n***/\n/*{{{*/\n\n#topMenu br {display:none; }\n#topMenu { background: #069; color: white; }\n#topMenu { padding:8px; }\n#topMenu .button, #topMenu .tiddlyLink {\n margin-left:0.5em; margin-right:0.5em;\n padding-left:3px; padding-right:3px;\n color:white; font-size:115%;\n}\n#topMenu .button:hover, #topMenu .tiddlyLink:hover { background:#178;}\n\n#displayArea { margin: 1em 15.7em 0em 1em; } /* so we use the freed up space */\n\n/* just in case want some QuickOpenTags in your topMenu */\n#topMenu .quickopentag { padding:0px; margin:0px; border:0px; }\n#topMenu .quickopentag .tiddlyLink { padding-right:1px; margin-right:0px; }\n#topMenu .quickopentag .button { padding-left:1px; margin-left:0px; border:0px; }\n\n\n/*}}}*/
These are plugins I'm working on that aren't useful yet.
/***\n|''Name:''|IntelliTiddle|\n|''Version:''|0.1 (Oct 2005)|\n|''Source:''|Tiddly W;nks (http://danielbaird.com/tiddlywinks/)|\n|''Author:''|[[Daniel Baird]]|\n|''Type:''|Erm..|\n!Description\n\nThinking about a typeahead thing abc\n\ntest zone\n\n\n\n\n!Notes\n* no notes so far\naaaa[[a\n!Revision History\n* 0.1 (Oct-05)\n** first go\n\n***/\n/*{{{*/\n\n// =======================================================================\nversion.extensions.intellitiddle = {major: 0, minor: 1, revision: 0};\n// =======================================================================\nvar intelliTiddle_guessMode = false;\nvar intelliTiddle_lastCode = 0;\nvar intelliTiddle_startAt = 0;\n// first, override the edit tiddler function to install a keylistener\n// -----------------------------------------------------------------------\nintelliTiddle_OldCreateTiddlerEditor = createTiddlerEditor;\n// -----------------------------------------------------------------------\ncreateTiddlerEditor = function(title) {\n intelliTiddle_OldCreateTiddlerEditor(title);\n theBodyBox = document.getElementById('editorBody'+title);\n intelliTiddle_guessMode = false;\n theBodyBox.onkeyup = intelliTiddle_handleKeyUp;\n}\n// -----------------------------------------------------------------------\nintelliTiddle_handleKeyUp = function(e) {\n if (!e) var e = window.event;\n if (intelliTiddle_guessMode == true) {\n // char 221 is the ]\n if (e.keyCode == 221) {\n intelliTiddle_guessMode = false;\n } else {\n // make a guess here..\n var node = resolveTarget(e);\n intelliTiddle_insertGuess(node, intelliTiddle_guessTiddler(node) );\n }\n } else {\n // char 219 is the [\n intelliTiddle_guessMode =\n (intelliTiddle_lastCode == 219 && e.keyCode == 219);\n if (intelliTiddle_guessMode) intelliTiddle_startAt = resolveTarget(e).selectionStart;\n intelliTiddle_lastCode = e.keyCode;\n }\n// alert('after keyup, guessMode = ' + intelliTiddle_guessMode + ', lastcode = ' + intelliTiddle_lastCode);\n}\n// -----------------------------------------------------------------------\nintelliTiddle_guessTiddler = function(node) {\n var typedstart = intelliTiddle_startAt;\n var typedend = node.selectionStart;\n var typed = node.value.substring(typedstart, typedend);\n var typedlen = typed.length;\n\n for(var t in store.tiddlers) {\n if ( t.substr(0,typedlen-1) == typed ) return t.substr(typedlen);\n }\n}\n// -----------------------------------------------------------------------\nintelliTiddle_insertGuess = function(node, guess) {\n if (document.selection) {\n // first try for ie type stuff\n node.focus();\n sel = document.selection.createRange();\n sel.text = guess;\n } else if (node.selectionStart || node.selectionStart == '0') {\n // next try for ff/moz\n var startPos = node.selectionStart;\n var endPos = node.selectionEnd;\n node.value = node.value.substring(0, startPos) + guess + node.value.substring(endPos, node.value.length);\n node.selectionStart = startPos;\n node.selectionEnd = startPos + guess.length;\n } else {\n // otherwise do something lame\n node.value += guess;\n }\n}\n// -----------------------------------------------------------------------\n// =======================================================================\n/*}}}*/\n
[[About This Site|About Tiddly W;nks!]]\n//[[Play Minesweeper!]]//\n//[[Roll Dice!]]//\n\n@@background:#025;padding:0.4em 0.1em;<<tag [[My Plugins]]>>@@\n\n<<tag [[In Development]]>>\n\n[[Contact Daniel|Daniel Baird]]\n\n@@color:#0cf;\nTW v<<version>>\n[[legal info]]\n@@
/***\n|''Name:''|Minesweeper|\n|''Version:''|0.72 (12 Oct 2005)|\n|''Source:''|Tiddly W;nks (http://www.bur.st/~blazeoz/tiddlywinks/)|\n|''Author:''|[[Daniel Baird]]|\n|''Type:''|Macro|\n!Description\nIt's minesweeper!\n\n!Syntax/Example usage\n{{{<<minesweeper>>}}} or {{{<<minesweeper [width] [height] [bombs]>>}}}\n<<minesweeper>>\n\n!Notes\n* Let me know if you want graphics, or that MSWindows Minesweeper thing where you can click with both buttons on a numbered square, and it does the thinking for you..\n\n!Revision History\n* 0.5.0 (2-Oct-05)\n** original version (Daniel)\n* 0.5.1 (3-Oct-05)\n** added the css styles via set~StyleSheet (Simon)\n* 0.5.2 (3-Oct-05)\n** added parameters to macro and fixed bug preventing detection of win (Simon)\n* 0.6 (5-Oct-05)\n** Fixed the problem with multiple games on screen at once.\n** Cleaned up the JavaScript warning generated when you clicked anywhere but on a square.\n* 0.7 (6-Oct-05)\n** Integrated sweet additions from Genesis_mage (genisis329 at gmail dot com) that:\n*** allows winning by having all non-mines clicked (without having to mark every mine)\n*** added a mark button to mark and unmark mines without the keyboard\n** Win time now shows tenths of a second.\n* 0.71 (10-Oct-05)\n** tweaked a style to make the mark button work better in IE\n* 0.72 (12-Oct-05)\n** worked out how to use a closure as a event handler, which means that the code added in 0.6 could be made a lot simpler.\n\n***/\n/*{{{*/\n\nversion.extensions.minesweeper = {major: 0, minor: 7, revision: 2};\n\nconfig.macros.minesweeper = {};\n\nconfig.macros.minesweeper.handler = function(place,macroName,params) {\n var width = params[0];\n var height = params[1];\n var bombs = params[2];\n\n if (width == undefined) width = 9;\n if (height == undefined) height = width;\n if (bombs == undefined) bombs = Math.round(width * height / 8)\n if (bombs > width * height) bombs = width * height;\n\n var aGame = new MinesweeperGame();\n\n createTiddlyElement(place,'div',aGame.id,null,'If you see this, Minesweeper is broken. Let Daniel know (DanielBaird at gmail dot com).');\n aGame.newGame(width, height, bombs);\n}\n// =======================================================================\nfunction MinesweeperGame() {\n this.idprefix = 'mines';\n this.version = '0.72 beta';\n this.id = this.idprefix + MinesweeperGame.prototype.nextid;\n MinesweeperGame.prototype.nextid++;\n return this;\n}\n// -----------------------------------------------------------------------\nMinesweeperGame.prototype.nextid = 0;\n// -----------------------------------------------------------------------\nMinesweeperGame.prototype.newGame = function(height, width, mines) {\n this.height = height;\n this.width = width;\n this.mines = mines;\n this.total = height * width;\n this.markMode = false;\n\n this.startGame();\n}\n// -----------------------------------------------------------------------\nMinesweeperGame.prototype.startGame = function() {\n\n this.gamestate = 'ready';\n this.clicks = 0;\n this.marks = 0;\n this.message = 'click on the board to begin';\n\n this.starttime = null;\n this.wintime = null;\n this.board = new Array();\n\n // create the squares\n for (var x = 0; x < this.height; x++) {\n var row = new Array();\n for (var y = 0; y < this.width; y++) {\n row.push( {count: 0, mine: false, clicked: false, marked: false} );\n }\n this.board.push(row);\n }\n\n // add mines\n for (var m = 0; m < this.mines; m++) {\n var mx = Math.round((this.height-1)*Math.random());\n var my = Math.round((this.width-1)*Math.random());\n if (this.board[mx][my].mine) {\n m--;\n } else {\n this.board[mx][my].mine = true;\n }\n }\n\n // work out counts\n for (var cx = 0; cx < this.height; cx++) {\n for (var cy = 0; cy < this.width; cy++) {\n var count = 0;\n for (var dx = -1; dx < 2; dx++) {\n for (var dy = -1; dy < 2; dy++) {\n var nx = cx + dx;\n var ny = cy + dy;\n if ( (!(dx==0 && dy==0))\n && (nx >= 0) && (nx < this.height)\n && (ny >= 0) && (ny < this.width)\n && this.board[nx][ny].mine) {\n count++;\n }\n }\n }\n this.board[cx][cy].count = count;\n }\n }\n this.showBoard();\n}\n// -----------------------------------------------------------------------\nMinesweeperGame.prototype.showBoard = function() {\n var node = document.getElementById(this.id);\n var html = new Array();\n html.push('<table class="minefield" cellspacing="2">');\n html.push('<tr><td class="info" colspan="'+this.width+'">');\n html.push('Minesweeper '+this.version+'<br /><b>'+this.gamestate+'</b>');\n if (this.gamestate == 'playing') {\n this.message = (this.mines - this.marks)+' mines unmarked';\n }\n html.push('</td></tr>');\n for (var x = 0; x < this.height; x++) {\n html.push('<tr>');\n for (var y = 0; y < this.width; y++) {\n html.push( this.makeSquare(x,y) );\n }\n html.push('</tr>');\n }\n var cls = 'un';\n if (this.markMode) cls = '';\n html.push('<tr><td id="'+this.id+'_markbtn" class="'+cls+'clicked widebtn" colspan="'+this.width+'">mark / unmark mines</td></tr>');\n html.push('<tr><td class="info" colspan="'+this.width+'">'+this.message);\n html.push('<small>');\n html.push('<br /><span class="minesweeper' + cls + 'show">ctrl- shift- or alt-</span>click to reveal a square');\n html.push('<br /><span class="minesweeper' + cls + 'hide">ctrl- shift- or alt-</span>click to mark a mine');\n html.push('</small>');\n html.push('</td></tr>');\n html.push('</table>');\n node.innerHTML = html.join('');\n node.onclick = this.getClickHandler();\n}\n// -----------------------------------------------------------------------\nMinesweeperGame.prototype.makeSquare = function(x,y) {\n var sq = this.board[x][y];\n var reveal = (this.gamestate != 'playing' && this.gamestate != 'ready');\n var html = new Array();\n if (sq.clicked) {\n html.push('<td class="clicked" id="'+this.id+'_x-'+x+'_y-'+y+'">');\n if (!sq.marked && reveal && sq.mine) {\n html.push('B!');\n } else if (!sq.marked && reveal && sq.mine) {\n html.push('B!');\n } else if (sq.count > 0){\n html.push(sq.count);\n } else {\n html.push('&nbsp;');\n }\n } else {\n html.push('<td class="unclicked" id="'+this.id+'_x-'+x+'_y-'+y+'">');\n if (sq.marked && !reveal) {\n html.push('B?');\n } else if (sq.marked && sq.mine && reveal) {\n html.push('B');\n } else if (sq.marked && !sq.mine && reveal) {\n html.push('X');\n } else if (sq.mine && reveal) {\n html.push('B!');\n } else {\n html.push('&nbsp;');\n }\n }\n html.push('</td>');\n return html.join('');\n}\n// -------------------------------------------------------------------\nMinesweeperGame.prototype.clickSquare = function(cx,cy,modifier) {\n if (this.gamestate == 'ready') {\n this.starttime = new Date();\n this.gamestate = 'playing';\n }\n if (this.gamestate == 'playing') {\n if (!this.board[cx][cy].clicked) {\n if ( (modifier && !this.markMode) || (!modifier && this.markMode) ) {\n if (this.board[cx][cy].marked) {\n this.marks--;\n this.board[cx][cy].marked = false;\n } else {\n this.marks++;\n this.board[cx][cy].marked = true;\n }\n } else if (!this.board[cx][cy].clicked && !this.board[cx][cy].marked) {\n this.revealSquare(cx,cy);\n }\n this.markMode = false;\n }\n this.checkWin();\n this.showBoard();\n } else {\n // clicked when we're not playing..\n this.startGame();\n }\n}\n// -------------------------------------------------------------------\nMinesweeperGame.prototype.revealSquare = function(x,y) {\n if (this.board[x][y].clicked == false && this.board[x][y].marked == false) {\n this.board[x][y].clicked = true;\n this.clicks++;\n if (this.board[x][y].mine) {\n this.gamestate = 'boom!';\n this.message = 'click board to play again';\n } else if (this.board[x][y].count == 0) {\n // if it's a zero, we might have to reveal some other squares..\n for (var dx = -1; dx < 2; dx++) {\n for (var dy = -1; dy < 2; dy++) {\n var nx = x + dx;\n var ny = y + dy;\n if ( (!(dx==0 && dy==0)) && (nx >= 0) && (nx < this.height) && (ny >= 0) && (ny < this.width) ) {\n this.revealSquare(nx,ny);\n }\n }\n }\n }\n }\n}\n// -------------------------------------------------------------------\nMinesweeperGame.prototype.handleClick = function(e) {\n // work out which cell was clicked\n if (!e) var e = window.event;\n var str = resolveTarget(e).id;\n if (str && str != undefined) {\n if (str == this.id + '_markbtn') {\n this.markMode = !this.markMode;\n this.showBoard();\n } else {\n var cx = parseInt(str.substr( str.indexOf('x-')+2 ));\n var cy = parseInt(str.substr( str.indexOf('y-')+2 ));\n if ( !isNaN(cx) && !isNaN(cy) ) {\n this.clickSquare(cx,cy,(e.altKey || e.shiftKey || e.ctrlKey));\n }\n }\n }\n}\n// -------------------------------------------------------------------\nMinesweeperGame.prototype.getClickHandler = function() {\n var thisGame = this;\n return function(e) {\n thisGame.handleClick(e);\n }\n}\n// -------------------------------------------------------------------\nMinesweeperGame.prototype.checkWin = function() {\n if (this.clicks == this.total - this.mines && this.gamestate !='boom!') {\n this.gamestate = 'win';\n this.wintime = new Date();\n this.message = 'You won in '+Math.round(((this.wintime - this.starttime)/100))/10+' seconds';\n this.message = this.message + '<br />click board to play again';\n }\n}\n// -----------------------------------------------------------------------\n\nsetStylesheet(\n ".viewer .minefield { "+\n "background: #ddd; "+\n "border: double 3px black; "+\n "border-collapse: separate; "+\n "border-spacing: 2px; "+\n "} \sn"+\n\n ".viewer .minefield td { "+\n "cursor: default; "+\n "width: 1.3em; "+\n "height: 1.1em; "+\n "text-align: center; "+\n "vertical-align: center; "+\n "background: #ddd; "+\n "border: 1px solid #ccc; "+\n "} \sn"+\n\n ".viewer .minefield td.info, .viewer .minefield td.widebtn { "+\n "width: auto; "+\n "} \sn"+\n\n ".minesweeperhide, .minesweeperunshow { "+\n "display: none; "+\n "} \sn"+\n\n ".viewer .minefield td.unclicked { "+\n "cursor: pointer; "+\n "border-color: #fff; "+\n "border-right-color: #999; "+\n "border-bottom-color: #999; "+\n "} \sn"+\n "",\n "MinesweeperGame");\n\n/*}}}*/\n
Here are TiddlyWiki plugins I've written. This is probably why you came to this site..
/***\n|Name|NewHereCommand|\n|Source|http://simonbaird.com/mptw/#NewHereCommand|\n|Version|1.0|\n\nCode originally by ArphenLin. Small tweak by SimonBaird\nhttp://aiddlywiki.sourceforge.net/NewHere_demo.html#NewHereCommand\nTo use this you must edit your ViewTemplate and add newHere to the toolbar div, eg\n{{{<div class='toolbar' macro='toolbar ... newHere'></div>}}}\n***/\n\n//{{{\n\nconfig.commands.newHere = {\n text: 'new here',\n tooltip: 'Create a new tiddler tagged as this tiddler',\n handler: function(e,src,title) {\n if (!readOnly) {\n clearMessage();\n var t=document.getElementById('tiddler'+title);\n story.displayTiddler(t,config.macros.newTiddler.title,DEFAULT_EDIT_TEMPLATE);\n story.setTiddlerTag(config.macros.newTiddler.title, title, 0);\n story.focusTiddler(config.macros.newTiddler.title,"title");\n return false;\n }\n }\n};\n\n//}}}
<!---\nI've just tweaked my gradient colours and the topMenu bit. See HorizontalMainMenu.\n--->\n<!--{{{-->\n<div class='header' macro='gradient vert #0cf #069'>\n<div class='headerShadow'>\n<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>\n<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>\n</div>\n<div class='headerForeground'>\n<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>\n<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>\n</div>\n<div id='topMenu' refresh='content' tiddler='MainMenu'></div>\n</div>\n<div id='sidebar'>\n<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>\n<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>\n</div>\n<div id='displayArea'>\n<div id='messageArea'></div>\n<div id='tiddlerDisplay'></div>\n</div>\n<!--}}}-->\n
Pick a game: (from my huge list ;)\n*[[Play Minesweeper!]]\n*[[Roll Dice!]]\n
<<minesweeper>>\n\nGet this [[Minesweeper]] plugin for your TiddlyWiki\n\nFeatures that might be coming:\n* proper graphics\n* remembering best times in a tiddler somewhere\n* nicer layout with less grey
/***\n| Name:|QuickOpenTagPlugin|\n| Purpose:|Makes tag links into a Taggly style open tag plus a normal style drop down menu|\n| Creator:|SimonBaird|\n| Source:|http://simonbaird.com/mptw/#QuickOpenTagPlugin|\n| Requires:|TW 2.x|\n| Version|1.1 (7-Feb-06)|\n\n!History\n* Version 1.1 (07/02/2006)\n** Fix Firefox 1.5.0.1 crashes\n** Updated by ~BidiX[at]~BidiX.info\n* Version 1.0 (?/01/2006)\n** First release\n\n***/\n//{{{\n\n//⊻ ⊽ ⋁ ▼ \n\nwindow.createTagButton_orig_mptw = createTagButton;\nwindow.createTagButton = function(place,tag,excludeTiddler) {\n var sp = createTiddlyElement(place,"span",null,"quickopentag");\n createTiddlyLink(sp,tag,true,"button");\n var theTag = createTiddlyButton(sp,config.macros.miniTag.dropdownchar,config.views.wikified.tag.tooltip.format([tag]),onClickTag);\n theTag.setAttribute("tag",tag);\n if(excludeTiddler)\n theTag.setAttribute("tiddler",excludeTiddler);\n return(theTag);\n};\n\nconfig.macros.miniTag = {handler:function(place,macroName,params,wikifier,paramString,tiddler) {\n var tagged = store.getTaggedTiddlers(tiddler.title);\n if (tagged.length > 0) {\n var theTag = createTiddlyButton(place,config.macros.miniTag.dropdownchar,config.views.wikified.tag.tooltip.format([tiddler.title]),onClickTag);\n theTag.setAttribute("tag",tiddler.title);\n theTag.className = "miniTag";\n }\n}};\n\nconfig.macros.miniTag.dropdownchar = (document.all?"▼":"▾"); // the fat one is the only one that works in IE\n\nconfig.macros.allTags.handler = function(place,macroName,params)\n{\n var tags = store.getTags();\n var theDateList = createTiddlyElement(place,"ul",null,null,null);\n if(tags.length === 0)\n createTiddlyElement(theDateList,"li",null,"listTitle",this.noTags);\n for (var t=0; t<tags.length; t++)\n {\n var theListItem =createTiddlyElement(theDateList,"li",null,null,null);\n var theLink = createTiddlyLink(theListItem,tags[t][0],true);\n var theCount = " (" + tags[t][1] + ")";\n theLink.appendChild(document.createTextNode(theCount));\n\n var theDropDownBtn = createTiddlyButton(theListItem," "+config.macros.miniTag.dropdownchar,this.tooltip.format([tags[t][0]]),onClickTag);\n theDropDownBtn.setAttribute("tag",tags[t][0]);\n }\n};\n\n\nsetStylesheet(\n ".quickopentag { margin-right:1.2em; border:1px solid #eee; padding:2px; padding-right:0px; padding-left:1px; }\sn"+\n ".quickopentag .tiddlyLink { padding:2px; padding-left:3px; }\sn"+\n ".quickopentag a.button { padding:1px; padding-left:2px; padding-right:2px;}\sn"+\n "a.miniTag {font-size:150%;}\sn"+\n "",\n"QuickOpenTagStyles");\n\n//}}}\n\n/***\n<html>&#x22bb; &#x22bd; &#x22c1; &#x25bc; &#x25be;</html>\n***/\n
/***\n| Name:|RenameTagsPlugin|\n| Purpose:|Allows you to easily rename tags|\n| Creator:|SimonBaird|\n| Source:|http://simonbaird.com/mptw/#RenameTagsPlugin|\n| Version:|1.0.1 (5-Mar-06)|\n\n!Description\nIf you rename a tiddler/tag that is tagging other tiddlers this plugin will ask you if you want to rename the tag in each tiddler where it is used. This is essential if you use tags and ever want to rename them. To use it, open the tag you want to rename as a tiddler (it's the last option in the tag popup menu), edit it, rename it and click done. You will asked if you want to rename the tag. Click OK to rename the tag in the tiddlers that use it. Click Cancel to not rename the tag.\n\n!Example\nTry renaming [[Plugins]] or [[CSS]] on this site.\n\n!History\n* 1.0.1 (5-Mar-06) - Added feature to allow renaming of tags without side-effect of creating a tiddler\n* 1.0.0 (5-Mar-06) - First working version\n\n!Code\n***/\n//{{{\n\nversion.extensions.RenameTagsPlugin = {\n major: 1, minor: 0, revision: 0,\n date: new Date(2006,3,5),\n source: "http://simonbaird.com/mptw/#RenameTagsPlugin"\n};\n\nconfig.macros.RenameTagsPlugin = {};\nconfig.macros.RenameTagsPlugin.prompt = "Rename the tag '%0' to '%1' in %2 tidder%3?";\n\n// these are very useful, perhaps they should be in the core\nif (!store.addTag) {\n store.addTag = function(title,tag) {\n var t=this.getTiddler(title); if (!t || !t.tags) return;\n t.tags.push(tag);\n };\n};\n\nif (!store.removeTag) {\n store.removeTag = function(title,tag) {\n var t=this.getTiddler(title); if (!t || !t.tags) return;\n if (t.tags.find(tag)!=null) t.tags.splice(t.tags.find(tag),1);\n };\n};\n\nstore.saveTiddler_orig_tagrename = store.saveTiddler;\nstore.saveTiddler = function(title,newTitle,newBody,modifier,modified,tags) {\n if (title != newTitle && this.getTaggedTiddlers(title).length > 0) {\n // then we are renaming a tag\n var tagged = this.getTaggedTiddlers(title);\n if (confirm(config.macros.RenameTagsPlugin.prompt.format([title,newTitle,tagged.length,tagged.length>1?"s":""]))) {\n for (var i=0;i<tagged.length;i++) {\n store.removeTag(tagged[i].title,title);\n store.addTag(tagged[i].title,newTitle);\n // if tiddler is visible refresh it to show updated tag\n story.refreshTiddler(tagged[i].title,false,true);\n }\n }\n if (!this.tiddlerExists(title) && newBody == "") {\n // dont create unwanted tiddler\n return null;\n }\n }\n return this.saveTiddler_orig_tagrename(title,newTitle,newBody,modifier,modified,tags);\n}\n\n//}}}\n\n
{{{<<dice 3d6>>}}}\n<<dice 3d6>>\n{{{<<dice 1d20>>}}}\n<<dice 1d20>>\n[hmm.. maybe I don't need to do a grand total when it's only one die being rolled ;D ]\n----\n[[Get this plugin|Dice]] for your TiddlyWiki
/***\nThis CSS by DaveBirss.\n***/\n/*{{{*/\n\n.tabSelected {\n background: #fff;\n}\n\n.tabUnselected {\n background: #eee;\n}\n\n#sidebar {\n color: #000;\n}\n\n#sidebarOptions {\n background: #fff;\n}\n\n#sidebarOptions .button {\n color: #999;\n}\n\n#sidebarOptions .button:hover {\n color: #000;\n background: #fff;\n border-color:white;\n}\n\n#sidebarOptions .button:active {\n color: #000;\n background: #fff;\n}\n\n#sidebarOptions .sliderPanel {\n background: transparent;\n}\n\n#sidebarOptions .sliderPanel A {\n color: #999;\n}\n\n#sidebarOptions .sliderPanel A:hover {\n color: #000;\n background: #fff;\n}\n\n#sidebarOptions .sliderPanel A:active {\n color: #000;\n background: #fff;\n}\n\n.sidebarSubHeading {\n color: #000;\n}\n\n#sidebarTabs {`\n background: #fff\n}\n\n#sidebarTabs .tabSelected {\n color: #000;\n background: #fff;\n border-top: solid 1px #ccc;\n border-left: solid 1px #ccc;\n border-right: solid 1px #ccc;\n border-bottom: none;\n}\n\n#sidebarTabs .tabUnselected {\n color: #999;\n background: #eee;\n border-top: solid 1px #ccc;\n border-left: solid 1px #ccc;\n border-right: solid 1px #ccc;\n border-bottom: none;\n}\n\n#sidebarTabs .tabContents {\n background: #fff;\n}\n\n\n#sidebarTabs .txtMoreTab .tabSelected {\n background: #fff;\n}\n\n#sidebarTabs .txtMoreTab .tabUnselected {\n background: #eee;\n}\n\n#sidebarTabs .txtMoreTab .tabContents {\n background: #fff;\n}\n\n#sidebarTabs .tabContents .tiddlyLink {\n color: #999;\n}\n\n#sidebarTabs .tabContents .tiddlyLink:hover {\n background: #fff;\n color: #000;\n}\n\n#sidebarTabs .tabContents {\n color: #000;\n}\n\n#sidebarTabs .button {\n color: #666;\n}\n\n#sidebarTabs .tabContents .button:hover {\n color: #000;\n background: #fff;\n}\n\n/*}}}*/
some TiddlyWiki stuff by [[Daniel Baird]]
[[Tiddly W;nks!|About Tiddly W;nks!]]
http://danielbaird.com/tiddlywinks/
/***\nCosmetic fixes that probably should be included in a future TW...\n***/\n/*{{{*/\n.viewer .listTitle { list-style-type:none; margin-left:-2em; }\n.editorFooter .button { padding-top: 0px; padding-bottom:0px; }\n/*}}}*/\n/***\nImportant stuff. See TagglyTaggingStyles and HorizontalMainMenuStyles\n***/\n/*{{{*/\n[[TagglyTaggingStyles]]\n[[HorizontalMainMenuStyles]]\n/*}}}*/\n/***\nClint's fix for weird IE behaviours\n***/\n/*{{{*/\nbody {position:static;}\n.tagClear{margin-top:1em;clear:both;}\n/*}}}*/\n/***\nJust colours, fonts, tweaks etc. See SideBarWhiteAndGrey\n***/\n/*{{{*/\nbody {background:#eee; }\na{ color: #069; }\na:hover{ background: #069; color: #fff; }\n.popup { background: #178; border: 1px solid #069; }\n.headerForeground a { color: #9ef;}\n.headerShadow { left: 2px; top: 2px; }\n.title { padding:0px; margin:0px; }\n.siteSubtitle { padding:0px; margin:0px; padding-left:1.5em; }\n.subtitle { font-size:90%; color:#ccc; padding-left:0.25em; }\nh1,h2,h3,h4,h5 { color: #000; background: transparent; }\n.title {color:black; font-size:2em;}\n.shadow .title {color:#999; }\n.viewer pre { background-color:#f8f8ff; border-color:#ddf}\n.viewer { padding-top:0px; }\n#sidebarOptions { border:1px #ccc solid; }\n.tiddler {\n border-bottom:1px solid #ccc; border-right:1px solid #ccc; padding-bottom:1em; margin-bottom:1em; \n background:#fff; padding-right:1.5em; }\n#messageArea { background-color:#bde; border-color:#8ab; border-width:4px; border-style:dotted; font-size:90%; }\n#messageArea .button { text-decoration:none; font-weight:bold; background:transparent; border:0px; }\n#messageArea .button:hover {background: #acd; }\n[[SideBarWhiteAndGrey]]\n#adsense { margin: 1em 15.7em 0em 1em; border:1px solid #ddd; background:#f8f8f8; text-align:center;margin-bottom:1em;overflow:hidden;padding:0.5em;} \n/*}}}*/\n
/***\n|Name|TagglyListPlugin|\n|Created by|SimonBaird|\n|Location|http://simonbaird.com/mptw/#TagglyListPlugin|\n|Version|1.1.1 6-Mar-06|\n|Requires|See TagglyTagging|\n\n!History\n* 1.1.1 (6-Mar-2006) fixed bug with refreshAllVisible closing tiddlers being edited. Thanks Luke Blanshard.\n\n***/\n\n/***\n!Setup and config\n***/\n//{{{\n\nversion.extensions.TagglyListPlugin = {\n major: 1, minor: 1, revision: 1,\n date: new Date(2006,3,6),\n source: "http://simonbaird.com/mptw/#TagglyListPlugin"\n};\n\nconfig.macros.tagglyList = {};\nconfig.macros.tagglyListByTag = {};\nconfig.macros.tagglyListControl = {};\nconfig.macros.tagglyListWithSort = {};\nconfig.macros.hideSomeTags = {};\n\n// change this to your preference\nconfig.macros.tagglyListWithSort.maxCols = 6;\n\nconfig.macros.tagglyList.label = "Tagged as %0:";\n\n// the default sort options. set these to your preference\nconfig.macros.tagglyListWithSort.defaults = {\n sortBy:"title", // title|created|modified\n sortOrder: "asc", // asc|desc\n hideState: "show", // show|hide\n groupState: "nogroup", // nogroup|group\n numCols: 1\n};\n\n// these tags will be ignored by the grouped view\nconfig.macros.tagglyListByTag.excludeTheseTags = [\n "systemConfig",\n "TiddlerTemplates"\n];\n\nconfig.macros.tagglyListControl.tags = {\n title:"sortByTitle", \n modified: "sortByModified", \n created: "sortByCreated",\n asc:"sortAsc", \n desc:"sortDesc",\n hide:"hideTagged", \n show:"showTagged",\n nogroup:"noGroupByTag",\n group:"groupByTag",\n cols1:"list1Cols",\n cols2:"list2Cols",\n cols3:"list3Cols",\n cols4:"list4Cols",\n cols5:"list5Cols",\n cols6:"list6Cols",\n cols7:"list7Cols",\n cols8:"list8Cols",\n cols9:"list9Cols" \n}\n\n// note: should match config.macros.tagglyListControl.tags\nconfig.macros.hideSomeTags.tagsToHide = [\n "sortByTitle",\n "sortByCreated",\n "sortByModified",\n "sortDesc",\n "sortAsc",\n "hideTagged",\n "showTagged",\n "noGroupByTag",\n "groupByTag",\n "list1Cols",\n "list2Cols",\n "list3Cols",\n "list4Cols",\n "list5Cols",\n "list6Cols",\n "list7Cols",\n "list8Cols",\n "list9Cols"\n];\n\n\n//}}}\n/***\n\n!Utils\n***/\n//{{{\n// from Eric\nfunction isTagged(title,tag) {\n var t=store.getTiddler(title); if (!t) return false;\n return (t.tags.find(tag)!=null);\n}\n\n// from Eric\nfunction toggleTag(title,tag) {\n var t=store.getTiddler(title); if (!t || !t.tags) return;\n if (t.tags.find(tag)==null) t.tags.push(tag);\n else t.tags.splice(t.tags.find(tag),1);\n}\n\nfunction addTag(title,tag) {\n var t=store.getTiddler(title); if (!t || !t.tags) return;\n t.tags.push(tag);\n}\n\nfunction removeTag(title,tag) {\n var t=store.getTiddler(title); if (!t || !t.tags) return;\n if (t.tags.find(tag)!=null) t.tags.splice(t.tags.find(tag),1);\n}\n\n// from Udo\nArray.prototype.indexOf = function(item) {\n for (var i = 0; i < this.length; i++) {\n if (this[i] == item) {\n return i;\n }\n }\n return -1;\n};\nArray.prototype.contains = function(item) {\n return (this.indexOf(item) >= 0);\n}\n//}}}\n/***\n\n!tagglyList\ndisplays a list of tagged tiddlers. \nparameters are sortField and sortOrder\n***/\n//{{{\n\n// not used at the moment...\nfunction sortedListOfOtherTags(tiddler,thisTag) {\n var list = tiddler.tags.concat(); // so we are working on a clone..\n for (var i=0;i<config.macros.hideSomeTags.tagsToHide.length;i++) {\n if (list.find(config.macros.hideSomeTags.tagsToHide[i]) != null)\n list.splice(list.find(config.macros.hideSomeTags.tagsToHide[i]),1); // remove hidden ones\n }\n for (var i=0;i<config.macros.tagglyListByTag.excludeTheseTags.length;i++) {\n if (list.find(config.macros.tagglyListByTag.excludeTheseTags[i]) != null)\n list.splice(list.find(config.macros.tagglyListByTag.excludeTheseTags[i]),1); // remove excluded ones\n }\n list.splice(list.find(thisTag),1); // remove thisTag\n return '[[' + list.sort().join("]] [[") + ']]';\n}\n\nfunction sortHelper(a,b) {\n if (a == b) return 0;\n else if (a < b) return -1;\n else return +1;\n}\n\nconfig.macros.tagglyListByTag.handler = function (place,macroName,params,wikifier,paramString,tiddler) {\n\n var sortBy = params[0] ? params[0] : "title"; \n var sortOrder = params[1] ? params[1] : "asc";\n\n var result = store.getTaggedTiddlers(tiddler.title,sortBy);\n\n if (sortOrder == "desc")\n result = result.reverse();\n\n var leftOvers = []\n for (var i=0;i<result.length;i++) {\n leftOvers.push(result[i].title);\n }\n\n var allTagsHolder = {};\n for (var i=0;i<result.length;i++) {\n for (var j=0;j<result[i].tags.length;j++) {\n\n if ( \n result[i].tags[j] != tiddler.title // not this tiddler\n && config.macros.hideSomeTags.tagsToHide.find(result[i].tags[j]) == null // not a hidden one\n && config.macros.tagglyListByTag.excludeTheseTags.find(result[i].tags[j]) == null // not excluded\n ) {\n if (!allTagsHolder[result[i].tags[j]])\n allTagsHolder[result[i].tags[j]] = "";\n allTagsHolder[result[i].tags[j]] += "**[["+result[i].title+"]]\sn";\n\n if (leftOvers.find(result[i].title) != null)\n leftOvers.splice(leftOvers.find(result[i].title),1); // remove from leftovers. at the end it will contain the leftovers...\n }\n }\n }\n\n\n var allTags = [];\n for (var t in allTagsHolder)\n allTags.push(t);\n\n allTags.sort(function(a,b) {\n var tidA = store.getTiddler(a);\n var tidB = store.getTiddler(b);\n if (sortBy == "title") return sortHelper(a,b);\n else if (!tidA && !tidB) return 0;\n else if (!tidA) return -1;\n else if (!tidB) return +1;\n else return sortHelper(tidA[sortBy],tidB[sortBy]);\n });\n\n var markup = "";\n\n if (sortOrder == "desc") {\n allTags.reverse();\n }\n else {\n // leftovers first...\n for (var i=0;i<leftOvers.length;i++)\n markup += "*[["+leftOvers[i]+"]]\sn";\n } \n\n for (var i=0;i<allTags.length;i++)\n markup += "*[["+allTags[i]+"]]\sn" + allTagsHolder[allTags[i]];\n\n if (sortOrder == "desc") {\n // leftovers last...\n for (var i=0;i<leftOvers.length;i++)\n markup += "*[["+leftOvers[i]+"]]\sn";\n }\n\n wikify(markup,place);\n}\n\nconfig.macros.tagglyList.handler = function (place,macroName,params,wikifier,paramString,tiddler) {\n var sortBy = params[0] ? params[0] : "title"; \n var sortOrder = params[1] ? params[1] : "asc";\n var numCols = params[2] ? params[2] : 1;\n\n var result = store.getTaggedTiddlers(tiddler.title,sortBy);\n if (sortOrder == "desc")\n result = result.reverse();\n\n var listSize = result.length;\n var colSize = listSize/numCols;\n var remainder = listSize % numCols;\n\n var upperColsize;\n var lowerColsize;\n if (colSize != Math.floor(colSize)) {\n // it's not an exact fit so..\n lowerColsize = Math.floor(colSize);\n upperColsize = Math.floor(colSize) + 1;\n }\n else {\n lowerColsize = colSize;\n upperColsize = colSize;\n }\n\n var markup = "";\n var c=0;\n\n var newTaggedTable = createTiddlyElement(place,"table");\n var newTaggedBody = createTiddlyElement(newTaggedTable,"tbody");\n var newTaggedTr = createTiddlyElement(newTaggedBody,"tr");\n\n for (var j=0;j<numCols;j++) {\n var foo = "";\n var thisSize;\n\n if (j<remainder)\n thisSize = upperColsize;\n else\n thisSize = lowerColsize;\n\n for (var i=0;i<thisSize;i++) \n foo += ( "*[[" + result[c++].title + "]]\sn"); // was using splitList.shift() but didn't work in IE;\n\n var newTd = createTiddlyElement(newTaggedTr,"td",null,"tagglyTagging");\n wikify(foo,newTd);\n\n }\n\n};\n\n/* snip for later.....\n //var groupBy = params[3] ? params[3] : "t.title.substr(0,1)";\n //var groupBy = params[3] ? params[3] : "sortedListOfOtherTags(t,tiddler.title)";\n //var groupBy = params[3] ? params[3] : "t.modified";\n var groupBy = null; // for now. groupBy here is working but disabled for now.\n\n var prevGroup = "";\n var thisGroup = "";\n\n if (groupBy) {\n result.sort(function(a,b) {\n var t = a; var aSortVal = eval(groupBy); var aSortVal2 = eval("t".sortBy);\n var t = b; var bSortVal = eval(groupBy); var bSortVal2 = eval("t".sortBy);\n var t = b; var bSortVal2 = eval(groupBy);\n return (aSortVal == bSortVal ?\n (aSortVal2 == bSortVal2 ? 0 : (aSortVal2 < bSortVal2 ? -1 : +1)) // yuck\n : (aSortVal < bSortVal ? -1 : +1));\n });\n }\n\n if (groupBy) {\n thisGroup = eval(groupBy);\n if (thisGroup != prevGroup)\n markup += "*[["+thisGroup+']]\sn';\n markup += "**[["+t.title+']]\sn';\n prevGroup = thisGroup;\n }\n\n\n\n*/\n\n\n//}}}\n\n/***\n\n!tagglyListControl\nUse to make the sort control buttons\n***/\n//{{{\n\nfunction getSortBy(title) {\n var tiddler = store.getTiddler(title);\n var defaultVal = config.macros.tagglyListWithSort.defaults.sortBy;\n if (!tiddler) return defaultVal;\n var usetags = config.macros.tagglyListControl.tags;\n if (tiddler.tags.contains(usetags["title"])) return "title";\n else if (tiddler.tags.contains(usetags["modified"])) return "modified";\n else if (tiddler.tags.contains(usetags["created"])) return "created";\n else return defaultVal;\n}\n\nfunction getSortOrder(title) {\n var tiddler = store.getTiddler(title);\n var defaultVal = config.macros.tagglyListWithSort.defaults.sortOrder;\n if (!tiddler) return defaultVal;\n var usetags = config.macros.tagglyListControl.tags;\n if (tiddler.tags.contains(usetags["asc"])) return "asc";\n else if (tiddler.tags.contains(usetags["desc"])) return "desc";\n else return defaultVal;\n}\n\nfunction getHideState(title) {\n var tiddler = store.getTiddler(title);\n var defaultVal = config.macros.tagglyListWithSort.defaults.hideState;\n if (!tiddler) return defaultVal;\n var usetags = config.macros.tagglyListControl.tags;\n if (tiddler.tags.contains(usetags["hide"])) return "hide";\n else if (tiddler.tags.contains(usetags["show"])) return "show";\n else return defaultVal;\n}\n\nfunction getGroupState(title) {\n var tiddler = store.getTiddler(title);\n var defaultVal = config.macros.tagglyListWithSort.defaults.groupState;\n if (!tiddler) return defaultVal;\n var usetags = config.macros.tagglyListControl.tags;\n if (tiddler.tags.contains(usetags["group"])) return "group";\n else if (tiddler.tags.contains(usetags["nogroup"])) return "nogroup";\n else return defaultVal;\n}\n\nfunction getNumCols(title) {\n var tiddler = store.getTiddler(title);\n var defaultVal = config.macros.tagglyListWithSort.defaults.numCols; // an int\n if (!tiddler) return defaultVal;\n var usetags = config.macros.tagglyListControl.tags;\n for (var i=1;i<=config.macros.tagglyListWithSort.maxCols;i++)\n if (tiddler.tags.contains(usetags["cols"+i])) return i;\n return defaultVal;\n}\n\n\nfunction getSortLabel(title,which) {\n // TODO. the strings here should be definable in config\n var by = getSortBy(title);\n var order = getSortOrder(title);\n var hide = getHideState(title);\n var group = getGroupState(title);\n if (which == "hide") return (hide == "show" ? "−" : "+"); // 0x25b8;\n else if (which == "group") return (group == "group" ? "normal" : "grouped");\n else if (which == "cols") return "cols±"; // &plusmn;\n else if (by == which) return which + (order == "asc" ? "↓" : "↑"); // &uarr; &darr;\n else return which;\n}\n\nfunction handleSortClick(title,which) {\n var currentSortBy = getSortBy(title);\n var currentSortOrder = getSortOrder(title);\n var currentHideState = getHideState(title);\n var currentGroupState = getGroupState(title);\n var currentNumCols = getNumCols(title);\n\n var tags = config.macros.tagglyListControl.tags;\n\n // if it doesn't exist, lets create it..\n if (!store.getTiddler(title))\n store.saveTiddler(title,title,"",config.options.txtUserName,new Date(),null);\n\n if (which == "hide") {\n // toggle hide state\n var newHideState = (currentHideState == "hide" ? "show" : "hide");\n removeTag(title,tags[currentHideState]);\n if (newHideState != config.macros.tagglyListWithSort.defaults.hideState)\n toggleTag(title,tags[newHideState]);\n }\n else if (which == "group") {\n // toggle hide state\n var newGroupState = (currentGroupState == "group" ? "nogroup" : "group");\n removeTag(title,tags[currentGroupState]);\n if (newGroupState != config.macros.tagglyListWithSort.defaults.groupState)\n toggleTag(title,tags[newGroupState]);\n }\n else if (which == "cols") {\n // toggle num cols\n var newNumCols = currentNumCols + 1; // confusing. currentNumCols is an int\n if (newNumCols > config.macros.tagglyListWithSort.maxCols || newNumCols > store.getTaggedTiddlers(title).length)\n newNumCols = 1;\n removeTag(title,tags["cols"+currentNumCols]);\n if (("cols"+newNumCols) != config.macros.tagglyListWithSort.defaults.groupState)\n toggleTag(title,tags["cols"+newNumCols]);\n }\n else if (currentSortBy == which) {\n // toggle sort order\n var newSortOrder = (currentSortOrder == "asc" ? "desc" : "asc");\n removeTag(title,tags[currentSortOrder]);\n if (newSortOrder != config.macros.tagglyListWithSort.defaults.sortOrder)\n toggleTag(title,tags[newSortOrder]);\n }\n else {\n // change sortBy only\n removeTag(title,tags["title"]);\n removeTag(title,tags["created"]);\n removeTag(title,tags["modified"]);\n\n if (which != config.macros.tagglyListWithSort.defaults.sortBy)\n toggleTag(title,tags[which]);\n }\n\n store.setDirty(true); // save is required now.\n story.refreshTiddler(title,false,true); // force=true\n}\n\nconfig.macros.tagglyListControl.handler = function (place,macroName,params,wikifier,paramString,tiddler) {\n var onclick = function(e) {\n if (!e) var e = window.event;\n handleSortClick(tiddler.title,params[0]);\n e.cancelBubble = true;\n if (e.stopPropagation) e.stopPropagation();\n return false;\n };\n createTiddlyButton(place,getSortLabel(tiddler.title,params[0]),"Click to change sort options",onclick,params[0]=="hide"?"hidebutton":"button");\n}\n//}}}\n/***\n\n!tagglyListWithSort\nput it all together..\n***/\n//{{{\nconfig.macros.tagglyListWithSort.handler = function (place,macroName,params,wikifier,paramString,tiddler) {\n if (tiddler && store.getTaggedTiddlers(tiddler.title).length > 0)\n // todo make this readable\n wikify(\n "<<tagglyListControl hide>>"+\n (getHideState(tiddler.title) != "hide" ? \n '<html><span class="tagglyLabel">'+config.macros.tagglyList.label.format([tiddler.title])+' </span></html>'+\n "<<tagglyListControl title>><<tagglyListControl modified>><<tagglyListControl created>><<tagglyListControl group>>"+(getGroupState(tiddler.title)=="group"?"":"<<tagglyListControl cols>>")+"\sn" + \n "<<tagglyList" + (getGroupState(tiddler.title)=="group"?"ByTag ":" ") + getSortBy(tiddler.title)+" "+getSortOrder(tiddler.title)+" "+getNumCols(tiddler.title)+">>" // hacky\n // + \sn----\sn" +\n //"<<tagglyList "+getSortBy(tiddler.title)+" "+getSortOrder(tiddler.title)+">>"\n : ""),\n place,null,tiddler);\n}\n\n//}}}\n/***\n\n!hideSomeTags\nSo we don't see the sort tags.\n(note, they are still there when you edit. Will that be too annoying?\n***/\n//{{{\n\n// based on tags.handler\nconfig.macros.hideSomeTags.handler = function(place,macroName,params,wikifier,paramString,tiddler) {\n var theList = createTiddlyElement(place,"ul");\n if(params[0] && store.tiddlerExists[params[0]])\n tiddler = store.getTiddler(params[0]);\n var lingo = config.views.wikified.tag;\n var prompt = tiddler.tags.length == 0 ? lingo.labelNoTags : lingo.labelTags;\n createTiddlyElement(theList,"li",null,"listTitle",prompt.format([tiddler.title]));\n for(var t=0; t<tiddler.tags.length; t++)\n if (!this.tagsToHide.contains(tiddler.tags[t])) // this is the only difference from tags.handler...\n createTagButton(createTiddlyElement(theList,"li"),tiddler.tags[t],tiddler.title);\n\n}\n\n//}}}\n/***\n\n!Refresh everything when we save a tiddler. So the tagged lists never get stale. Is this too slow???\n***/\n//{{{\n\nfunction refreshAllVisible() {\n story.forEachTiddler(function(title,element) {\n if (element.getAttribute("dirty") != "true") \n story.refreshTiddler(title,false,true);\n });\n}\n\nstory.saveTiddler_orig_mptw = story.saveTiddler;\nstory.saveTiddler = function(title,minorUpdate) {\n var result = this.saveTiddler_orig_mptw(title,minorUpdate);\n refreshAllVisible();\n return result;\n}\n\nstore.removeTiddler_orig_mptw = store.removeTiddler;\nstore.removeTiddler = function(title) {\n this.removeTiddler_orig_mptw(title);\n refreshAllVisible();\n}\n\n//}}}\n\n// // <html>&#x25b8;&#x25be;&minus;&plusmn;</html>
/***\nTo use, add {{{[[TagglyTaggingStyles]]}}} to your StyleSheet tiddler, or you can just paste the CSS in directly. See also ViewTemplate, EditTemplate and TagglyTagging.\n***/\n/*{{{*/\n.tagglyTagged li.listTitle { display:none;}\n.tagglyTagged li { display: inline; font-size:90%; }\n.tagglyTagged ul { margin:0px; padding:0px; }\n.tagglyTagging { padding-top:0.5em; }\n.tagglyTagging li.listTitle { display:none;}\n.tagglyTagging ul { margin-top:0px; padding-top:0.5em; padding-left:2em; margin-bottom:0px; padding-bottom:0px; }\n\n/* .tagglyTagging .tghide { display:inline; } */\n\n.tagglyTagging { vertical-align: top; margin:0px; padding:0px; }\n.tagglyTagging table { margin:0px; padding:0px; }\n\n\n.tagglyTagging .button { display:none; margin-left:3px; margin-right:3px; }\n.tagglyTagging .button, .hidebutton { color:#aaa; font-size:90%; border:0px; padding-left:0.3em;padding-right:0.3em;}\n.tagglyTagging .button:hover, .hidebutton:hover { background:#eee; color:#888; }\n.selected .tagglyTagging .button { display:inline; }\n\n.tagglyLabel { color:#aaa; font-size:90%; }\n\n.tagglyTagging ul {padding-top:0px; padding-bottom:0.5em; margin-left:1em; }\n.tagglyTagging ul ul {list-style-type:disc; margin-left:-1em;}\n.tagglyTagging ul ul li {margin-left:0.5em; }\n\n.editLabel { font-size:90%; padding-top:0.5em; }\n/*}}}*/\n
TiddlyWiki rocks. One HTML file -- perhaps it's on your USB stick -- and you've got a whole cross-platform wiki at your fingertips.\n\nStart at the [[TiddlyWiki site|http://www.tiddlywiki.com]].
<!---\n| Name:|~TagglyTaggingViewTemplate |\n| Version:|1.2 (16-Jan-2006)|\n| Source:|http://simonbaird.com/mptw/#TagglyTaggingViewTemplate|\n| Purpose:|See TagglyTagging for more info|\n| Requires:|You need the CSS in TagglyTaggingStyles to make it look right|\n!History\n* 16-Jan-06, version 1.2, added tagglyListWithSort\n* 12-Jan-06, version 1.1, first version\n!Notes\nRemove the miniTag if you don't like it or you don't use QuickOpenTagPlugin\n--->\n<!--{{{-->\n<div class="toolbar" macro="toolbar -closeTiddler closeOthers +editTiddler permalink references jump newHere"></div>\n<div class="tagglyTagged" macro="hideSomeTags"></div>\n<div><span class="title" macro="view title"></span><span class="miniTag" macro="miniTag"></span></div>\n<div class='subtitle'>Updated <span macro='view modified date [[DD MMM, YYYY]]'></span></div>\n<div class="viewer" macro="view text wikified"></div>\n<div class="tagglyTagging" macro="tagglyListWithSort"></div>\n<!--}}}-->\n
TiddlyWiki © [[osmosoft|http://www.osmosoft.com]] 2006\n(See [[TiddlyWiki.com|http://tiddlywiki.com/]] for [[license information|http://tiddlywiki.com/#OpenSourceLicense]])\n\nContent © [[Daniel Baird]] 2005 - 2006\n