Uni
Copy
View As
Plain text (markdown)
Formatted text (html)
Presentation (impress.js)
Structured text (json)
Sign up for free
to use this document yourself.
[ ] TO DOs
[ X ] finished TO DOs
{"cards":[{"_id":"4308f16a17c0a7f44d00022b","treeId":"4306b2c517c0a7f44d00015d","seq":32281,"position":0.5,"parentId":null,"content":"[ ] TO DOs\n[ X ] finished TO DOs"},{"_id":"430920cee5d0e0231d000034","treeId":"4306b2c517c0a7f44d00015d","seq":32960,"position":1,"parentId":"4308f16a17c0a7f44d00022b","content":"<script>\n(function(){\nfunction get_text(el) {\n ret = \"\";\n var length = el.childNodes.length;\n for(var i = 0; i < length; i++) {\n var node = el.childNodes[i];\n if(node.nodeType != 8) {\n ret += node.nodeType != 1 ? node.nodeValue : get_text(node);\n }\n }\n return ret;\n}\n\nBackbone.on('key:save',function(){\n$('.card .view').map(function(c){\nvar words = get_text(this).split(/\\S+/g).length - 1;\n\nif($($(this)[0]).children('span.wordcount').length == 0) {\n $(this).append(\"<span class='wordcount'>\"+words+\" words</span>\");\n} else {\n$($(this)[0]).children('span.wordcount').innerHtml = words+\" words\";\n}\n\n})\n});\n})();\n</script>\n\n<style>\nspan.wordcount {\nposition: absolute;\nbottom: 10px;\nvertical-align: center;\nright: 50%;\nfont-size: 70%;\ncolor: #ddd;\n}\nli.card.card-active span.wordcount {\ncolor: #333;\n}\n</style>"}],"tree":{"_id":"4306b2c517c0a7f44d00015d","name":"Uni","publicUrl":"uni"}}