Skip to content

Instantly share code, notes, and snippets.

@martin12333
Forked from Jermolene/hack
Created March 19, 2019 17:16
Show Gist options
  • Save martin12333/38c2a423f480f260a5ca3d9ef75fea31 to your computer and use it in GitHub Desktop.
Save martin12333/38c2a423f480f260a5ca3d9ef75fea31 to your computer and use it in GitHub Desktop.
Word counting hack for TiddlyWiki 5.1.7
var tag="mytag";r="";$tw.wiki.each(function(t){if(t.hasTag(tag)){r=r+" "+(t.fields.text||"")}});r.trim().replace(/\s+/gi," ").split(" ").length
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment