[
  {
    "path": ".github/FUNDING.yml",
    "content": "github: [tholman]\ncustom: ['https://www.buymeacoffee.com/tholman']\n"
  },
  {
    "path": ".gitignore",
    "content": ".c9revisions\n.DS_Store"
  },
  {
    "path": "css/fonts.css",
    "content": "@font-face {\n\tfont-family: 'icomoon';\n\tsrc:url('fonts/icomoon.eot');\n\tsrc:url('fonts/icomoon.eot?#iefix') format('embedded-opentype'),\n\t\turl('fonts/icomoon.woff') format('woff'),\n\t\turl('fonts/icomoon.ttf') format('truetype'),\n\t\turl('fonts/icomoon.svg#icomoon') format('svg');\n\tfont-weight: normal;\n\tfont-style: normal;\n}\n\n/* Use the following CSS code if you want to use data attributes for inserting your icons */\n[data-icon]:before {\n\tfont-family: 'icomoon';\n\tcontent: attr(data-icon);\n\tspeak: none;\n\tfont-weight: normal;\n\tfont-variant: normal;\n\ttext-transform: none;\n\tline-height: 1;\n\t-webkit-font-smoothing: antialiased;\n}\n\n/* Use the following CSS code if you want to have a class per icon */\n/*\nInstead of a list of all class selectors,\nyou can use the generic selector below, but it's slower:\n[class*=\"icon-\"] {\n*/\n.icon-expand, .icon-target, .icon-contrast, .icon-floppy, .icon-contract, .icon-link, .icon-download-alt {\n\tfont-family: 'icomoon';\n\tspeak: none;\n\tfont-style: normal;\n\tfont-weight: normal;\n\tfont-variant: normal;\n\ttext-transform: none;\n\tline-height: 1;\n\t-webkit-font-smoothing: antialiased;\n}\n.icon-expand:before {\n\tcontent: \"\\e000\";\n}\n.icon-target:before {\n\tcontent: \"\\e001\";\n}\n.icon-contrast:before {\n\tcontent: \"\\e002\";\n}\n.icon-floppy:before {\n\tcontent: \"\\e003\";\n}\n.icon-contract:before {\n\tcontent: \"\\e004\";\n}\n.icon-link:before {\n\tcontent: \"\\e005\";\n}\n.icon-download-alt:before {\n\tcontent: \"\\e006\";\n}"
  },
  {
    "path": "css/style.css",
    "content": "/*!\n * ZenPen\n * http://www.zenpen.io\n * MIT licensed\n *\n * Copyright (C) Tim Holman, http://tholman.com\n */\n\n\n/*********************************************\n * BASE STYLES\n *********************************************/\n\n* {\n\t-moz-box-sizing: border-box;\n\tbox-sizing: border-box;\n}\n\n*:focus {\n\toutline: none;\n}\n\nhtml {\n\toverflow: hidden;\n}\n\n\nhtml, body {\n\tfont-family: 'Lora', serif;\n\tpadding: 0;\n\tmargin: 0;\n\theight: 100%;\n}\n\nbody {\n\tpadding-bottom: 40px;\n\tpadding-right: 10px;\n\toverflow-y: scroll;\n\tpadding-left: 10px;\n\tpadding-top: 20px;\n\tmin-width: 800px;\n\twidth: 100%;\n\n\t-webkit-transition: all 600ms;\n\t-moz-transition: all 600ms;\n\t-ms-transition: all 600ms;\n\t-o-transition: all 600ms;\n\ttransition: all 600ms;\n}\n\nsection {\n\tmax-width: 600px;\n\theight: 100%;\n\tmargin: auto;\n}\n\nheader {\n\tfont-weight: bold;\n\tfont-size: 38px;\n\tword-wrap: break-word;\n}\n\narticle {\n\tpadding-bottom: 50px;\n\tline-height: 30px;\n\tmargin-top: 22px;\n\tmin-height: 90%;\n\tfont-size: 22px;\n\tdisplay: block;\n\tword-wrap: break-word;\n}\n\nblockquote {\n\tborder-left: 4px solid deepskyblue;\n\tmargin-left: -19px;\n\tpadding-left: 15px;\n\tmargin-right: 0;\n}\n\n.no-overflow {\n\toverflow: hidden;\n\tdisplay: block;\n\theight: 100%;\n\twidth: 100%;\n}\n\n/* Used by the ui bubble to stop wrapping */\n.lengthen {\n\tdisplay: block;\n\twidth: 300px;\n\theight: 100%;\n}\n\n.useicons {\n\t-webkit-font-smoothing: antialiased;\n\tfont-size: 20px !important;\n\tfont-family: 'icomoon' !important;\n}\n\n.yin {\n\tbackground: #fdfdfd;\n\tcolor: #111;\n}\n\n.yang {\n\tbackground-color: #111;\n\tcolor: #fafafa;\n}\n\n.ui {\n\tposition: fixed;\n\tpadding: 20px;\n\twidth: 65px;\n\tbottom: 0;\n\tleft: 0;\n\ttop: 0;\n}\n\n.ui:hover button, .ui:hover .about {\n\topacity: .4;\n}\n\n.ui button:hover, .ui .about:hover {\n\topacity: 1;\n}\n\n.ui button, .text-options button {\n\n\t-webkit-transition: opacity 400ms;\n\t-moz-transition: opacity 400ms;\n\t-ms-transition: opacity 400ms;\n\t-o-transition: opacity 400ms;\n\ttransition: opacity 400ms;\n\n\tfont-family: inherit;\n\tbackground: none;\n\tcursor: pointer;\n\tfont-size: 25px;\n\tcolor: inherit;\n\topacity: .1;\n\tpadding: 0;\n\theight: 32px;\n\twidth: 25px;\n\tborder: 0;\n}\n\na {\n\ttext-decoration: none;\n\tcolor: deepskyblue;\n}\n\na:hover {\n\ttext-decoration: underline;\n}\n\n.overlay {\n\tposition: fixed;\n\tdisplay: none;\n\theight: 100%;\n\twidth: 100%;\n\tz-index: 3;\n\tleft: 0;\n\ttop: 0;\n}\n\n.quote {\n\tline-height: 60px !important;\n\tfont-size: 49px !important;\n}\n\n/*********************************************\n * MODAL\n *********************************************/\n\n.yang .modal {\n\tbackground-color: rgba(255,255,255,.9);\n\tcolor: #111;\n}\n\n.modal {\n\tbackground-color: rgba(0,0,0,.9);\n\tmargin-left: -200px;\n\tposition: absolute;\n\tborder-radius: 3px;\n\theight: 101px;\n\tpadding: 15px;\n\tdisplay: none;\n\twidth: 400px;\n\tbottom: 10px;\n\tcolor: #fff;\n\tleft: 50%;\n}\n\n.modal h1 {\n\ttext-align: center;\n\tfont-size: 20px;\n\tpadding: 0;\n\tmargin: 0;\n}\n\n.modal div {\n\tmargin-bottom: 10px;\n\tmargin-top: 10px;\n}\n\n.modal input[type=\"number\"] {\n\tfont-size: 16px;\n\tdisplay: block;\n\tmargin: auto;\n\twidth: 150px;\n\tpadding: 5px;\n}\n\n.description {\n\theight: auto;\n}\n\n.description p {\n\tmargin-bottom: 0;\n\ttext-align: center;\n}\n\n.saveoverlay {\n\tmargin-left: -215px;\n\tmargin-top: -100px;\n\theight: 170px;\n\tleft: 50%;\n\ttop: 50%;\n}\n\n.saveoverlay div {\n\ttext-align: center;\n\tfont-size: 11px;\n}\n\n.saveselection {\n\tmargin-top: 17px;\n\ttext-align:center;\n}\n\n.saveselection span {\n\n\t-webkit-transition: color 250ms, background 250ms;\n\t-moz-transition: color 250ms, background 250ms;\n\t-ms-transition: color 250ms, background 250ms;\n\t-o-transition: color 250ms, background 250ms;\n\ttransition: color 250ms, background 250ms;\n\n\tcursor: pointer;\n\tfont-size: 15px;\n\tmargin: 5px;\n\tpadding: 5px;\n\tborder: 2px solid white;\n\tborder-radius: 3px;\n}\n\n.saveselection span:hover {\n\tbackground: rgba(255,255,255,.8);\n\tcolor: black;\n}\n\n.savebutton {\n\n\t-webkit-transition: opacity 250ms;\n\t-moz-transition: opacity 250ms;\n\t-ms-transition: opacity 250ms;\n\t-o-transition: opacity 250ms;\n\ttransition: opacity 250ms;\n\n\tfont-size: 30px !important;\n\tmargin: 15px auto;\n\tbackground: none;\n\tcursor: pointer;\n\tdisplay: block;\n\tborder: none;\n\tpadding: 0;\n\twidth: 80px;\n\tcolor: #fff;\n\tmargin-top: -2px;\n}\n\n.yang .savebutton {\n\tcolor: #000;\n}\n\n.savebutton:hover {\n\topacity: .7;\n}\n\n.activesave {\n\tbackground: rgba(255,255,255,.8);\n\tcolor: black;\n}\n\n.hiddentextbox {\n\topacity:0;\n\tfilter:alpha(opacity=0);\n\tposition:absolute;\n}\n\n/*********************************************\n * WORD COUNT\n *********************************************/\n\n.wordcount {\n\tmargin-left: -150px;\n\twidth: 300px;\n}\n\n.word-counter {\n\tbox-shadow: inset 0 0 9px -2px rgba(0,0,0,.9);\n\tposition: fixed;\n\theight: 100%;\n\tright: -6px;\n\twidth: 6px;\n\ttop: 0;\n}\n\n.word-counter.active {\n\tright: 0;\n}\n\n.word-counter .progress {\n\t-webkit-transition: all 400ms ease-in-out;\n\t-moz-transition: all 400ms ease-in-out;\n\t-ms-transition: all 400ms ease-in-out;\n\t-o-transition: all 400ms ease-in-out;\n\ttransition: all 400ms ease-in-out;\n\t\n\tbackground-color: deepskyblue;\n\tposition: absolute;\n\tbottom: 0;\n\twidth: 100%;\n\theight: 0%;\n}\n\n.progress.complete{\n\tbackground-color: greenyellow;\n}\n\n/*********************************************\n * UI BUBBLE\n *********************************************/\n\n.text-options {\n\n\t-webkit-transition: opacity 250ms, margin 250ms;\n\t-moz-transition: opacity 250ms, margin 250ms;\n\t-ms-transition: opacity 250ms, margin 250ms;\n\t-o-transition: opacity 250ms, margin 250ms;\n\ttransition: opacity 250ms, margin 250ms;\n\n\tposition: absolute;\n\tleft: -999px;\n\ttop: -999px;\n\tcolor: #fff;\n\theight: 0;\n\twidth: 0;\n\tz-index: 5;\n\tmargin-top: 5px;\n\topacity: 0;\n}\n\n.text-options.fade {\n\topacity: 0;\n\tmargin-top: -5px;\n}\n\n.text-options.active {\n\topacity: 1;\n\tmargin-top: 0;\n}\n\n.options {\n\tbackground-color: rgba(0,0,0,.9);\n\tposition: absolute;\n\tborder-radius: 5px;\n\tmargin-left: -63px;\n\tmargin-top: -46px;\n\tz-index: 1000;\n\tpadding: 5px 4px 5px 5px;\n\twidth: 125px;\n\theight: 40px;\n\n\t-webkit-transition: all 300ms ease-in-out;\n\t-moz-transition: all 300ms ease-in-out;\n\t-ms-transition: all 300ms ease-in-out;\n\t-o-transition: all 300ms ease-in-out;\n\ttransition: all 300ms ease-in-out;\n}\n\n.options.url-mode {\n\twidth: 275px;\n\tmargin-left: -137px;\n}\n\n.options.url-mode .bold, .options.url-mode .italic, .options.url-mode .quote {\n\twidth: 0;\n\toverflow: hidden;\n\tmargin-right: 0;\n\topacity: 0;\n}\n\n.options .italic {\n\tfont-style: italic;\n}\n\n.options button {\n\ttransition: all 250ms ease-in-out;\n\n\tfloat: left;\n\twidth: 28px;\n\topacity: .7;\n\theight: 30px;\n\tborder-radius: 3px;\n\tmargin-right: 1px;\n\tfont-family: 'Lora', serif;\n}\n\n.about {\n\topacity: 0.4;\n\ttransition: opacity 250ms ease-in-out;\n}\n\n.options.url-mode input{\n\tborder-left: 2px solid transparent;\n\tpadding-right: 5px;\n\tpadding-left: 5px;\n\twidth: 236px;\n}\n\n.options input {\n\t-webkit-transition: all 300ms ease-in-out;\n\t-moz-transition: all 300ms ease-in-out;\n\t-ms-transition: all 300ms ease-in-out;\n\t-o-transition: all 300ms ease-in-out;\n\ttransition: all 300ms ease-in-out;\n\n\tborder-radius: 3px;\n\toverflow: hidden;\n\toutline: 0;\n\theight: 30px;\n\tpadding: 0;\n\tmargin: 0;\n\tborder: 0;\n\tfloat: left;\n\twidth: 0;\n}\n\n.options button.active {\n\tbackground-color: rgba(255,255,255,.4);\n\topacity: 1;\n}\n\n.yang .options button.active {\n\tbackground-color: rgba(0,0,0,.3);\n}\n\n.options button:hover, .about:hover {\n\topacity: .95;\n}\n\n.options:before {\n\tcontent: \"\";\n\tborder-top: 5px solid rgba(0,0,0,.9);\n\tborder-bottom: 5px solid transparent;\n\tborder-right: 5px solid transparent;\n\tborder-left: 5px solid transparent;\n\tposition: absolute;\n\tmargin-left: -5px;\n\tbottom: -15px;\n\theight: 5px;\n\twidth: 0;\n\tleft: 50%;\n}\n\n.yang .options {\n\tbackground-color: rgba(255,255,255,.9);\n\tcolor: #000;\n}\n\n.yang .options:before {\n\tborder-top: 5px solid rgba(255,255,255,.9);\n}\n\n.url {\n\t-webkit-font-smoothing: antialiased;\n}\n\n.top {\n\tposition: absolute;\n\ttop: 0;\n}\n\n.bottom {\n\tposition: absolute;\n\tbottom: 0;\n}\n\n.about {\n\tfont-size: 28px !important;\n\tfilter: grayscale(1);\n\ttext-decoration: none !important;\n}\n\n.wrapper {\n\tposition: relative;\n\theight: 100%;\n}\n\n/*********************************************\n * PRINT\n *********************************************/\n\n@media print {\n\n\tbody {\n\t\toverflow: visible;\n\t}\n\n\tsection {\n\t\tcolor: #111 !important;\n\t}\n\n\t.text-options, .ui, .word-counter {\n\t\tdisplay: none;\n\t}\n}\n"
  },
  {
    "path": "index.html",
    "content": "<!DOCTYPE html>\n<html>\n\t<head>\n\t\t<!-- MISC/META -->\n\t\t<title>ZenPen ~ Minimal Distraction, Maximum Zen</title>\n\t\t<meta charset=\"utf-8\" />\n\t\t<meta\n\t\t\tname=\"description\"\n\t\t\tcontent=\"Zenpen - A minimal text editor, made to stay out of the way while you get the words down.\"\n\t\t/>\n\n\t\t<!-- CSS -->\n\t\t<link\n\t\t\thref=\"//fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic\"\n\t\t\trel=\"stylesheet\"\n\t\t\ttype=\"text/css\"\n\t\t/>\n\t\t<link href=\"css/style.css\" rel=\"stylesheet\" />\n\t\t<link href=\"css/fonts.css\" rel=\"stylesheet\" />\n\t</head>\n\n\t<body class=\"yin\">\n\t\t<div class=\"overlay\">\n\t\t\t<div class=\"wordcount modal\">\n\t\t\t\t<h1>Target Word Count</h1>\n\t\t\t\t<div>\n\t\t\t\t\t<input type=\"number\" name=\"quantity\" value=\"0\" min=\"0\" />\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class=\"saveoverlay modal\">\n\t\t\t\t<h1>Select save format</h1>\n\t\t\t\t<p class=\"saveselection\">\n\t\t\t\t\t<span data-format=\"markdown\">Markdown</span>\n\t\t\t\t\t<span data-format=\"html\">HTML</span>\n\t\t\t\t\t<span data-format=\"plain\">Plain Text</span>\n\t\t\t\t</p>\n\t\t\t\t<button class=\"savebutton useicons\">&#xe006;</button>\n\t\t\t\t<div>\n\t\t\t\t\tOr select format and press ctrl+c (cmd+c on mac) to copy the text.\n\t\t\t\t</div>\n\t\t\t\t<textarea class=\"hiddentextbox\"></textarea>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div class=\"text-options\">\n\t\t\t<div class=\"options\">\n\t\t\t\t<span class=\"no-overflow\">\n\t\t\t\t\t<span class=\"lengthen ui-inputs\">\n\t\t\t\t\t\t<button class=\"url useicons\">&#xe005;</button>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tclass=\"url-input\"\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tplaceholder=\"Type or Paste URL here\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<button class=\"bold\">b</button>\n\t\t\t\t\t\t<button class=\"italic\">i</button>\n\t\t\t\t\t\t<button class=\"quote\">&rdquo;</button>\n\t\t\t\t\t</span>\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div class=\"ui\">\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<div class=\"top editing\">\n\t\t\t\t\t<button class=\"fullscreen useicons\" title=\"Toggle fullscreen\">\n\t\t\t\t\t\t&#xe000;\n\t\t\t\t\t</button>\n\n\t\t\t\t\t<button class=\"color-flip useicons\" title=\"Invert colors\">\n\t\t\t\t\t\t&#xe002;\n\t\t\t\t\t</button>\n\n\t\t\t\t\t<button class=\"target useicons\" title=\"Set target word count\">\n\t\t\t\t\t\t&#xe001;\n\t\t\t\t\t</button>\n\t\t\t\t\t<button class=\"save useicons\" title=\"Save Text\">\n\t\t\t\t\t\t&#xe003;\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"bottom\">\n\t\t\t\t\t<a\n\t\t\t\t\t\tclass=\"about\"\n\t\t\t\t\t\thref=\"https://www.buymeacoffee.com/tholman\"\n\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t>\n\t\t\t\t\t\t☕\n\t\t\t\t\t</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div class=\"word-counter\">\n\t\t\t<span class=\"progress\"></span>\n\t\t</div>\n\n\t\t<section>\n\t\t\t<header contenteditable=\"true\" class=\"header\"></header>\n\t\t\t<article contenteditable=\"true\" class=\"content\"></article>\n\t\t</section>\n\n\t\t<!-- LIBS -->\n\t\t<script src=\"js/libs/FileSaver.min.js\"></script>\n\t\t<script src=\"js/libs/Blob.min.js\"></script>\n\t\t<script src=\"js/libs/screenfull.min.js\"></script>\n\n\t\t<!-- JS -->\n\t\t<script src=\"js/default.js\"></script>\n\t\t<script src=\"js/utils.js\"></script>\n\t\t<script src=\"js/editor.js\"></script>\n\t\t<script src=\"js/ui.js\"></script>\n\t\t<script type=\"text/javascript\">\n\t\t\t// Initiate ZenPen\n\t\t\tZenPen.editor.init();\n\t\t\tZenPen.ui.init();\n\t\t</script>\n\t\t<!-- Global site tag (gtag.js) - Google Analytics -->\n\t\t<script\n\t\t\tasync\n\t\t\tsrc=\"https://www.googletagmanager.com/gtag/js?id=UA-38039699-1\"\n\t\t></script>\n\t\t<script>\n\t\t\twindow.dataLayer = window.dataLayer || [];\n\t\t\tfunction gtag() {\n\t\t\t\tdataLayer.push(arguments);\n\t\t\t}\n\t\t\tgtag(\"js\", new Date());\n\n\t\t\tgtag(\"config\", \"UA-38039699-1\");\n\t\t</script>\n\t</body>\n</html>\n"
  },
  {
    "path": "js/default.js",
    "content": "var defaultTitle = 'This is ZenPen';\nvar defaultContent = \n'<p>\\\nA minimalist writing zone, where you can block out all distractions and get to what\\'s important. The writing!  \\\n</p>\\\n<p> \\\n\tTo get started, all you need to do is delete this text (seriously, just highlight it and hit delete), and fill the page with your own fantastic words. You can even change the title!  \\\n</p> \\\n<p> \\\n\tYou can use <b>bold</b>, <i>italics</i>, <b><i>both</i></b> and <a href=\"http://zenpen.io\"> urls </a> just by highlighting the text and selecting them from the tiny options box that appears above it.\\\n</p>\\\n<blockquote>\\\n\tQuotes are easy to add too!\\\n</blockquote>\\\n<p>\\\n\tIf you\\'re using ZenPen, and want to contribute a few dollars, there\\'s a small donate button on the bottom left.\\\n</p>\\\n<p>Happy Typing! ~ <b>Tim Holman (@twholman)</b></p>';\n"
  },
  {
    "path": "js/editor.js",
    "content": "// editor\nZenPen = window.ZenPen || {};\nZenPen.editor = (function() {\n\n\t// Editor elements\n\tvar headerField, contentField, lastType, currentNodeList, lastSelection;\n\n\t// Editor Bubble elements\n\tvar textOptions, optionsBox, boldButton, italicButton, quoteButton, urlButton, urlInput;\n\n\tvar composing;\n\n\tfunction init() {\n\n\t\tcomposing = false;\n\t\tbindElements();\n\n\t\tcreateEventBindings();\n\n\t\t// Load state if storage is supported\n\t\tif ( ZenPen.util.supportsHtmlStorage() ) {\n\t\t\tloadState();\n\t\t} else {\n\t\t\tloadDefault();\n\t\t}\n\t\t// Set cursor position\n\t\tvar range = document.createRange();\n\t\tvar selection = window.getSelection();\n\t\trange.setStart(headerField, 1);\n\t\tselection.removeAllRanges();\n\t\tselection.addRange(range);\n\n\t}\n\n\tfunction createEventBindings() {\n\n\t\t// Key up bindings\n\t\tif ( ZenPen.util.supportsHtmlStorage() ) {\n\n\t\t\tdocument.onkeyup = function( event ) {\n\t\t\t\tcheckTextHighlighting( event );\n\t\t\t\tsaveState();\n\t\t\t}\n\n\t\t} else {\n\t\t\tdocument.onkeyup = checkTextHighlighting;\n\t\t}\n\n\t\t// Mouse bindings\n\t\tdocument.onmousedown = checkTextHighlighting;\n\t\tdocument.onmouseup = function( event ) {\n\n\t\t\tsetTimeout( function() {\n\t\t\t\tcheckTextHighlighting( event );\n\t\t\t}, 1);\n\t\t};\n\t\t\n\t\t// Window bindings\n\t\twindow.addEventListener( 'resize', function( event ) {\n\t\t\tupdateBubblePosition();\n\t\t});\n\n\n\t\tdocument.body.addEventListener( 'scroll', function() {\n\n\t\t\t// TODO: Debounce update bubble position to stop excessive redraws\n\t\t\tupdateBubblePosition();\n\t\t});\n\n\t\t// Composition bindings. We need them to distinguish\n\t\t// IME composition from text selection\n\t\tdocument.addEventListener( 'compositionstart', onCompositionStart );\n\t\tdocument.addEventListener( 'compositionend', onCompositionEnd );\n\t}\n\n\n\tfunction bindElements() {\n\n\t\theaderField = document.querySelector( '.header' );\n\t\tcontentField = document.querySelector( '.content' );\n\t\ttextOptions = document.querySelector( '.text-options' );\n\n\t\toptionsBox = textOptions.querySelector( '.options' );\n\n\t\tboldButton = textOptions.querySelector( '.bold' );\n\t\tboldButton.onclick = onBoldClick;\n\n\t\titalicButton = textOptions.querySelector( '.italic' );\n\t\titalicButton.onclick = onItalicClick;\n\n\t\tquoteButton = textOptions.querySelector( '.quote' );\n\t\tquoteButton.onclick = onQuoteClick;\n\n\t\turlButton = textOptions.querySelector( '.url' );\n\t\turlButton.onmousedown = onUrlClick;\n\n\t\turlInput = textOptions.querySelector( '.url-input' );\n\t\turlInput.onblur = onUrlInputBlur;\n\t\turlInput.onkeydown = onUrlInputKeyDown;\n\t}\n\n\tfunction checkTextHighlighting( event ) {\n\n\t\tvar selection = window.getSelection();\n\n\n\t\tif ( (event.target.className === \"url-input\" ||\n\t\t    event.target.classList.contains( \"url\" ) ||\n\t\t    event.target.parentNode.classList.contains( \"ui-inputs\" ) ) ) {\n\n\t\t\tcurrentNodeList = findNodes( selection.focusNode );\n\t\t\tupdateBubbleStates();\n\t\t\treturn;\n\t\t}\n\n\t\t// Check selections exist\n\t\tif ( selection.isCollapsed === true && lastType === false ) {\n\n\t\t\tonSelectorBlur();\n\t\t}\n\n\t\t// Text is selected\n\t\tif ( selection.isCollapsed === false && composing === false ) {\n\n\t\t\tcurrentNodeList = findNodes( selection.focusNode );\n\n\t\t\t// Find if highlighting is in the editable area\n\t\t\tif ( hasNode( currentNodeList, \"ARTICLE\") ) {\n\t\t\t\tupdateBubbleStates();\n\t\t\t\tupdateBubblePosition();\n\n\t\t\t\t// Show the ui bubble\n\t\t\t\ttextOptions.className = \"text-options active\";\n\t\t\t}\n\t\t}\n\n\t\tlastType = selection.isCollapsed;\n\t}\n\t\n\tfunction updateBubblePosition() {\n\t\tvar selection = window.getSelection();\n\t\tvar range = selection.getRangeAt(0);\n\t\tvar boundary = range.getBoundingClientRect();\n\t\t\n\t\ttextOptions.style.top = boundary.top - 5 + window.pageYOffset + \"px\";\n\t\ttextOptions.style.left = (boundary.left + boundary.right)/2 + \"px\";\n\t}\n\n\tfunction updateBubbleStates() {\n\n\t\t// It would be possible to use classList here, but I feel that the\n\t\t// browser support isn't quite there, and this functionality doesn't\n\t\t// warrent a shim.\n\n\t\tif ( hasNode( currentNodeList, 'B') ) {\n\t\t\tboldButton.className = \"bold active\"\n\t\t} else {\n\t\t\tboldButton.className = \"bold\"\n\t\t}\n\n\t\tif ( hasNode( currentNodeList, 'I') ) {\n\t\t\titalicButton.className = \"italic active\"\n\t\t} else {\n\t\t\titalicButton.className = \"italic\"\n\t\t}\n\n\t\tif ( hasNode( currentNodeList, 'BLOCKQUOTE') ) {\n\t\t\tquoteButton.className = \"quote active\"\n\t\t} else {\n\t\t\tquoteButton.className = \"quote\"\n\t\t}\n\n\t\tif ( hasNode( currentNodeList, 'A') ) {\n\t\t\turlButton.className = \"url useicons active\"\n\t\t} else {\n\t\t\turlButton.className = \"url useicons\"\n\t\t}\n\t}\n\n\tfunction onSelectorBlur() {\n\n\t\ttextOptions.className = \"text-options fade\";\n\t\tsetTimeout( function() {\n\n\t\t\tif (textOptions.className == \"text-options fade\") {\n\n\t\t\t\ttextOptions.className = \"text-options\";\n\t\t\t\ttextOptions.style.top = '-999px';\n\t\t\t\ttextOptions.style.left = '-999px';\n\t\t\t}\n\t\t}, 260 )\n\t}\n\n\tfunction findNodes( element ) {\n\n\t\tvar nodeNames = {};\n\n\t\t// Internal node?\n\t\tvar selection = window.getSelection();\n\n\t\t// if( selection.containsNode( document.querySelector('b'), false ) ) {\n\t\t// \tnodeNames[ 'B' ] = true;\n\t\t// }\n\n\t\twhile ( element.parentNode ) {\n\n\t\t\tnodeNames[element.nodeName] = true;\n\t\t\telement = element.parentNode;\n\n\t\t\tif ( element.nodeName === 'A' ) {\n\t\t\t\tnodeNames.url = element.href;\n\t\t\t}\n\t\t}\n\n\t\treturn nodeNames;\n\t}\n\n\tfunction hasNode( nodeList, name ) {\n\n\t\treturn !!nodeList[ name ];\n\t}\n\n\tfunction saveState( event ) {\n\t\t\n\t\tlocalStorage[ 'header' ] = headerField.innerHTML;\n\t\tlocalStorage[ 'content' ] = contentField.innerHTML;\n\t}\n\n\tfunction loadState() {\n\n\t\tif ( localStorage[ 'header' ] ) {\n\t\t\theaderField.innerHTML = localStorage[ 'header' ];\n\t\t} else {\n\t\t\theaderField.innerHTML = defaultTitle; // in default.js\n\t\t}\n\n\t\tif ( localStorage[ 'content' ] ) {\n\t\t\tcontentField.innerHTML = localStorage[ 'content' ];\n\t\t} else {\n\t\t\tloadDefaultContent()\n\t\t}\n\t}\n\n\tfunction loadDefault() {\n\t\theaderField.innerHTML = defaultTitle; // in default.js\n\t\tloadDefaultContent();\n\t}\n\n\tfunction loadDefaultContent() {\n\t\tcontentField.innerHTML = defaultContent; // in default.js\n\t}\n\n\tfunction onBoldClick() {\n\t\tdocument.execCommand( 'bold', false );\n\t}\n\n\tfunction onItalicClick() {\n\t\tdocument.execCommand( 'italic', false );\n\t}\n\n\tfunction onQuoteClick() {\n\n\t\tvar nodeNames = findNodes( window.getSelection().focusNode );\n\n\t\tif ( hasNode( nodeNames, 'BLOCKQUOTE' ) ) {\n\t\t\tdocument.execCommand( 'formatBlock', false, 'p' );\n\t\t\tdocument.execCommand( 'outdent' );\n\t\t} else {\n\t\t\tdocument.execCommand( 'formatBlock', false, 'blockquote' );\n\t\t}\n\t}\n\n\tfunction onUrlClick() {\n\n\t\tif ( optionsBox.className == 'options' ) {\n\n\t\t\toptionsBox.className = 'options url-mode';\n\n\t\t\t// Set timeout here to debounce the focus action\n\t\t\tsetTimeout( function() {\n\n\t\t\t\tvar nodeNames = findNodes( window.getSelection().focusNode );\n\n\t\t\t\tif ( hasNode( nodeNames , \"A\" ) ) {\n\t\t\t\t\turlInput.value = nodeNames.url;\n\t\t\t\t} else {\n\t\t\t\t\t// Symbolize text turning into a link, which is temporary, and will never be seen.\n\t\t\t\t\tdocument.execCommand( 'createLink', false, '/' );\n\t\t\t\t}\n\n\t\t\t\t// Since typing in the input box kills the highlighted text we need\n\t\t\t\t// to save this selection, to add the url link if it is provided.\n\t\t\t\tlastSelection = window.getSelection().getRangeAt(0);\n\t\t\t\tlastType = false;\n\n\t\t\t\turlInput.focus();\n\n\t\t\t}, 100);\n\n\t\t} else {\n\n\t\t\toptionsBox.className = 'options';\n\t\t}\n\t}\n\n\tfunction onUrlInputKeyDown( event ) {\n\n\t\tif ( event.keyCode === 13 ) {\n\t\t\tevent.preventDefault();\n\t\t\tapplyURL( urlInput.value );\n\t\t\turlInput.blur();\n\t\t}\n\t}\n\n\tfunction onUrlInputBlur( event ) {\n\n\t\toptionsBox.className = 'options';\n\t\tapplyURL( urlInput.value );\n\t\turlInput.value = '';\n\n\t\tcurrentNodeList = findNodes( window.getSelection().focusNode );\n\t\tupdateBubbleStates();\n\t}\n\n\tfunction applyURL( url ) {\n\n\t\trehighlightLastSelection();\n\n\t\t// Unlink any current links\n\t\tdocument.execCommand( 'unlink', false );\n\n\t\tif (url !== \"\") {\n\t\t\n\t\t\t// Insert HTTP if it doesn't exist.\n\t\t\tif ( !url.match(\"^(http|https)://\") ) {\n\n\t\t\t\turl = \"http://\" + url;\t\n\t\t\t} \n\n\t\t\tdocument.execCommand( 'createLink', false, url );\n\t\t}\n\t}\n\n\tfunction rehighlightLastSelection() {\n\t\tvar selection = window.getSelection();\n\t\tif (selection.rangeCount > 0) {\n\t\t\tselection.removeAllRanges();\n\t\t}\n\t\tselection.addRange( lastSelection );\n\t}\n\n\tfunction getWordCount() {\n\t\t\n\t\tvar text = ZenPen.util.getText( contentField );\n\n\t\tif ( text === \"\" ) {\n\t\t\treturn 0\n\t\t} else {\n\t\t\treturn text.split(/\\s+/).length;\n\t\t}\n\t}\n\n\tfunction onCompositionStart ( event ) {\n\t\tcomposing = true;\n\t}\n\n\tfunction onCompositionEnd (event) {\n\t\tcomposing = false;\n\t}\n\n\treturn {\n\t\tinit: init,\n\t\tsaveState: saveState,\n\t\tgetWordCount: getWordCount\n\t}\n\n})();\n"
  },
  {
    "path": "js/ui.js",
    "content": "// ui functions\nZenPen = window.ZenPen || {};\nZenPen.ui = (function() {\n\n\t// Base elements\n\tvar body, article, uiContainer, overlay, header;\n\n\t// Buttons\n\tvar screenSizeElement, colorLayoutElement, targetElement, saveElement;\n\n\t// Word Counter\n\tvar wordCountValue, wordCountBox, wordCountElement, wordCounter, wordCounterProgress;\n\t\n\t//save support\n\tvar supportsSave, saveFormat, textToWrite;\n\t\n\tvar expandScreenIcon = '&#xe000;';\n\tvar shrinkScreenIcon = '&#xe004;';\n\n\tvar darkLayout = false;\n\n\tfunction init() {\n\t\t\n\t\tsupportsSave = !!new Blob()?true:false;\n\t\t\n\t\tbindElements();\n\n\t\twordCountActive = false;\n\n\t\tif ( ZenPen.util.supportsHtmlStorage() ) {\n\t\t\tloadState();\n\t\t}\n\t\t\n\t\tconsole.log( \"Checkin under the hood eh? We've probably got a lot in common. You should totally check out ZenPen on github! (https://github.com/tholman/zenpen).\" );\n\t}\n\n\tfunction loadState() {\n\n\t\t// Activate word counter\n\t\tif ( localStorage['wordCount'] && localStorage['wordCount'] !== \"0\") {\t\t\t\n\t\t\twordCountValue = parseInt(localStorage['wordCount']);\n\t\t\twordCountElement.value = localStorage['wordCount'];\n\t\t\twordCounter.className = \"word-counter active\";\n\t\t\tupdateWordCount();\n\t\t}\n\n\t\t// Activate color switch\n\t\tif ( localStorage['darkLayout'] === 'true' ) {\n\t\t\tif ( darkLayout === false ) {\n\t\t\t\tdocument.body.className = 'yang';\n\t\t\t} else {\n\t\t\t\tdocument.body.className = 'yin';\n\t\t\t}\n\t\t\tdarkLayout = !darkLayout;\n\t\t}\n\n\t}\n\n\tfunction saveState() {\n\n\t\tif ( ZenPen.util.supportsHtmlStorage() ) {\n\t\t\tlocalStorage[ 'darkLayout' ] = darkLayout;\n\t\t\tlocalStorage[ 'wordCount' ] = wordCountElement.value;\n\t\t}\n\t}\n\n\tfunction bindElements() {\n\n\t\t// Body element for light/dark styles\n\t\tbody = document.body;\n\n\t\tuiContainer = document.querySelector( '.ui' );\n\n\t\t// UI element for color flip\n\t\tcolorLayoutElement = document.querySelector( '.color-flip' );\n\t\tcolorLayoutElement.onclick = onColorLayoutClick;\n\n\t\t// UI element for full screen\t\t\n\t\tscreenSizeElement = document.querySelector( '.fullscreen' );\n\t\tscreenSizeElement.onclick = onScreenSizeClick;\n\n\t\ttargetElement = document.querySelector( '.target ');\n\t\ttargetElement.onclick = onTargetClick;\n\t\t\n\t\t//init event listeners only if browser can save\n\t\tif (supportsSave) {\n\n\t\t\tsaveElement = document.querySelector( '.save' );\n\t\t\tsaveElement.onclick = onSaveClick;\n\t\t\t\n\t\t\tvar formatSelectors = document.querySelectorAll( '.saveselection span' );\n\t\t\tfor( var i in formatSelectors ) {\n\t\t\t\tformatSelectors[i].onclick = selectFormat;\n\t\t\t}\n\t\t\t\n\t\t\tdocument.querySelector('.savebutton').onclick = saveText;\n\t\t} else {\n\t\t\tdocument.querySelector('.save.useicons').style.display = \"none\";\n\t\t}\n\n\t\t// Overlay when modals are active\n\t\toverlay = document.querySelector( '.overlay' );\n\t\toverlay.onclick = onOverlayClick;\n\n\t\tarticle = document.querySelector( '.content' );\n\t\tarticle.onkeyup = onArticleKeyUp;\n\n\t\twordCountBox = overlay.querySelector( '.wordcount' );\n\t\twordCountElement = wordCountBox.querySelector( 'input' );\n\t\twordCountElement.onchange = onWordCountChange;\n\t\twordCountElement.onkeyup = onWordCountKeyUp;\n\t\t\n\t\tsaveModal = overlay.querySelector('.saveoverlay');\n\n\t\twordCounter = document.querySelector( '.word-counter' );\n\t\twordCounterProgress = wordCounter.querySelector( '.progress' );\n\n\t\theader = document.querySelector( '.header' );\n\t\theader.onkeypress = onHeaderKeyPress;\n\t}\n\n\tfunction onScreenSizeClick( event ) {\n\n\t\tscreenfull.toggle();\n   \t\tif ( screenfull.enabled ) {\n\t\t\tdocument.addEventListener( screenfull.raw.fullscreenchange, function () {\n\t\t\t\tif ( screenfull.isFullscreen ) {\n\t\t\t\t\tscreenSizeElement.innerHTML = shrinkScreenIcon;\n\t\t\t\t} else {\n\t\t\t\t\tscreenSizeElement.innerHTML = expandScreenIcon;\t\n\t\t\t\t}\n    \t\t});\n    \t}\n\t};\n\n\tfunction onColorLayoutClick( event ) {\n\t\tif ( darkLayout === false ) {\n\t\t\tdocument.body.className = 'yang';\n\t\t} else {\n\t\t\tdocument.body.className = 'yin';\n\t\t}\n\t\tdarkLayout = !darkLayout;\n\n\t\tsaveState();\n\t}\n\n\tfunction onTargetClick( event ) {\n\t\toverlay.style.display = \"block\";\n\t\twordCountBox.style.display = \"block\";\n\t\twordCountElement.focus();\n\t}\n\n\tfunction onSaveClick( event ) {\n\t\toverlay.style.display = \"block\";\n\t\tsaveModal.style.display = \"block\";\n\t}\n\n\tfunction saveText( event ) {\n\n\t\tif (typeof saveFormat != 'undefined' && saveFormat != '') {\n\t\t\tvar blob = new Blob([textToWrite], {type: \"text/plain;charset=utf-8\"});\n\t\t\t/* remove tabs and line breaks from header */\n\t\t\tvar headerText = header.innerHTML.replace(/(\\t|\\n|\\r)/gm,\"\");\n\t\t\tif (headerText === \"\") {\n\t\t\t    headerText = \"ZenPen\";\n\t\t\t}\n\t\t\tsaveAs(blob, headerText + '.txt');\n\t\t} else {\n\t\t\tdocument.querySelector('.saveoverlay h1').style.color = '#FC1E1E';\n\t\t}\n\t}\n\t\n\t/* Allows the user to press enter to tab from the title */\n\tfunction onHeaderKeyPress( event ) {\n\n\t\tif ( event.keyCode === 13 ) {\n\t\t\tevent.preventDefault();\n\t\t\tarticle.focus();\n\t\t}\n\t}\n\n\t/* Allows the user to press enter to tab from the word count modal */\n\tfunction onWordCountKeyUp( event ) {\n\t\t\n\t\tif ( event.keyCode === 13 ) {\n\t\t\tevent.preventDefault();\n\t\t\t\n\t\t\tsetWordCount( parseInt(this.value) );\n\n\t\t\tremoveOverlay();\n\n\t\t\tarticle.focus();\n\t\t}\n\t}\n\n\tfunction onWordCountChange( event ) {\n\n\t\tsetWordCount( parseInt(this.value) );\n\t}\n\n\tfunction setWordCount( count ) {\n\n\t\t// Set wordcount ui to active\n\t\tif ( count > 0) {\n\n\t\t\twordCountValue = count;\n\t\t\twordCounter.className = \"word-counter active\";\n\t\t\tupdateWordCount();\n\n\t\t} else {\n\n\t\t\twordCountValue = 0;\n\t\t\twordCounter.className = \"word-counter\";\n\t\t}\n\t\t\n\t\tsaveState();\n\t}\n\n\tfunction onArticleKeyUp( event ) {\n\n\t\tif ( wordCountValue > 0 ) {\n\t\t\tupdateWordCount();\n\t\t}\n\t}\n\n\tfunction updateWordCount() {\n\n\t\tvar wordCount = ZenPen.editor.getWordCount();\n\t\tvar percentageComplete = wordCount / wordCountValue;\n\t\twordCounterProgress.style.height = percentageComplete * 100 + '%';\n\n\t\tif ( percentageComplete >= 1 ) {\n\t\t\twordCounterProgress.className = \"progress complete\";\n\t\t} else {\n\t\t\twordCounterProgress.className = \"progress\";\n\t\t}\n\t}\n\n\tfunction selectFormat( e ) {\n\t\t\n\t\tif ( document.querySelectorAll('span.activesave').length > 0 ) {\n\t\t\tdocument.querySelector('span.activesave').className = '';\n\t\t}\n\t\t\n\t\tdocument.querySelector('.saveoverlay h1').style.cssText = '';\n\t\t\n\t\tvar targ;\n\t\tif (!e) var e = window.event;\n\t\tif (e.target) targ = e.target;\n\t\telse if (e.srcElement) targ = e.srcElement;\n\t\t\n\t\t// defeat Safari bug\n\t\tif (targ.nodeType == 3) {\n\t\t\ttarg = targ.parentNode;\n\t\t}\n\t\t\t\n\t\ttarg.className ='activesave';\n\t\t\n\t\tsaveFormat = targ.getAttribute('data-format');\n\t\t\n\t\tvar header = document.querySelector('header.header');\n\t\tvar headerText = header.innerHTML.replace(/(\\r\\n|\\n|\\r)/gm,\"\") + \"\\n\";\n\t\t\n\t\tvar body = document.querySelector('article.content');\n\t\tvar bodyText = body.innerHTML;\n\t\t\t\n\t\ttextToWrite = formatText(saveFormat,headerText,bodyText);\n\t\t\n\t\tvar textArea = document.querySelector('.hiddentextbox');\n\t\ttextArea.value = textToWrite;\n\t\ttextArea.focus();\n\t\ttextArea.select();\n\n\t}\n\n\tfunction formatText( type, header, body ) {\n\t\t\n\t\tvar text;\n\t\tswitch( type ) {\n\n\t\t\tcase 'html':\n\t\t\t\theader = \"<h1>\" + header + \"</h1>\";\n\t\t\t\ttext = header + body;\n\t\t\t\ttext = text.replace(/\\t/g, '');\n\t\t\tbreak;\n\n\t\t\tcase 'markdown':\n\t\t\t\theader = header.replace(/\\t/g, '');\n\t\t\t\theader = header.replace(/\\n$/, '');\n\t\t\t\theader = \"#\" + header + \"#\";\n\t\t\t\n\t\t\t\ttext = body.replace(/\\t/g, '');\n\t\t\t\n\t\t\t\ttext = text.replace(/<b>|<\\/b>/g,\"**\")\n\t\t\t\t\t.replace(/\\r\\n+|\\r+|\\n+|\\t+/ig,\"\")\n\t\t\t\t\t.replace(/<i>|<\\/i>/g,\"_\")\n\t\t\t\t\t.replace(/<blockquote>/g,\"> \")\n\t\t\t\t\t.replace(/<\\/blockquote>/g,\"\")\n\t\t\t\t\t.replace(/<p>|<\\/p>/gi,\"\\n\")\n\t\t\t\t\t.replace(/<br>/g,\"\\n\");\n\t\t\t\t\n\t\t\t\tvar links = text.match(/<a href=\"(.+)\">(.+)<\\/a>/gi);\n\t\t\t\t\n                                if (links !== null) {\n                                        for ( var i = 0; i<links.length; i++ ) {\n                                                var tmpparent = document.createElement('div');\n                                                tmpparent.innerHTML = links[i];\n                                                \n                                                var tmp = tmpparent.firstChild;\n                                                \n                                                var href = tmp.getAttribute('href');\n                                                var linktext = tmp.textContent || tmp.innerText || \"\";\n                                                \n                                                text = text.replace(links[i],'['+linktext+']('+href+')');\n                                        }\n                                }\n\t\t\t\t\n\t\t\t\ttext = header +\"\\n\\n\"+ text;\n\t\t\tbreak;\n\n\t\t\tcase 'plain':\n\t\t\t\theader = header.replace(/\\t/g, '');\n\t\t\t\n\t\t\t\tvar tmp = document.createElement('div');\n\t\t\t\ttmp.innerHTML = body;\n\t\t\t\ttext = tmp.textContent || tmp.innerText || \"\";\n\t\t\t\t\n\t\t\t\ttext = text.replace(/\\t/g, '')\n\t\t\t\t\t.replace(/\\n{3}/g,\"\\n\")\n\t\t\t\t\t.replace(/\\n/,\"\"); //replace the opening line break\n\t\t\t\t\n\t\t\t\ttext = header + text;\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn text;\n\t}\n\n\tfunction onOverlayClick( event ) {\n\n\t\tif ( event.target.className === \"overlay\" ) {\n\t\t\tremoveOverlay();\n\t\t}\n\t}\n\n\tfunction removeOverlay() {\n\t\t\n\t\toverlay.style.display = \"none\";\n\t\twordCountBox.style.display = \"none\";\n\t\tdescriptionModal.style.display = \"none\";\n\t\tsaveModal.style.display = \"none\";\n\t\t\n\t\tif ( document.querySelectorAll('span.activesave' ).length > 0) {\n\t\t\tdocument.querySelector('span.activesave').className = '';\n\t\t}\n\n\t\tsaveFormat='';\n\t}\n\n\treturn {\n\t\tinit: init\n\t}\n\n})();\n"
  },
  {
    "path": "js/utils.js",
    "content": "// Utility functions\nZenPen = window.ZenPen || {};\nZenPen.util = (function() {\n\n\tfunction supportsHtmlStorage() {\n\t\ttry {\n\t\t    return 'localStorage' in window && window['localStorage'] !== null;\n\t\t} catch (e) {\n\t\t    return false;\n\t\t}\n\t};\n\n\tfunction getText(el) {\n\t\tvar ret = \" \";\n\t\tvar length = el.childNodes.length;\n\t\tfor(var i = 0; i < length; i++) {\n\t\t    var node = el.childNodes[i];\n\t\t    if(node.nodeType != 8) {\n\n\t\t\tif ( node.nodeType != 1 ) {\n\t\t\t    // Strip white space.\n\t\t\t    ret += node.nodeValue;\n\t\t\t} else {\n\t\t\t    ret += getText( node );\n\t\t\t}\n\t\t    }\n\t\t}\n\t\treturn ZenPen.util.trim(ret);\n\t};\n\n\tfunction trim(string) { \n\t\treturn string.replace(/^\\s+|\\s+$/g, ''); \n\t};\n\n\treturn {\n\t\ttrim: trim,\n\t\tgetText: getText,\n\t\tsupportsHtmlStorage: supportsHtmlStorage\n\t}\n\n})()"
  },
  {
    "path": "license.md",
    "content": "## The MIT License (MIT)\n\nCopyright (c) 2025 ~ Tim Holman - @twholman\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "readme.md",
    "content": "## ZenPen - A minimalist writing zone.\n\nZenpen (http://zenpen.io) is a web app for writing minimally, and getting into the Zone.\n\nAll information is persistent locally, using HTML5 local storage.\n\n### ZenPen's minimal interface\n![ZenPen](https://i.imgur.com/uP8Ensx.png)\n\n### Text styling\n![Text Styling](https://i.imgur.com/J8T88O7.png)\n\n### Saving\n![Saving](https://i.imgur.com/TkXX4aI.png)\n\n### License\n\nThe MIT License\n\nCopyright (C) 2016 ~ [Tim Holman](http://tholman.com) ~ timothy.w.holman@gmail.com\n"
  }
]