<commit_before>﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US-x-Hixie">
<head>
<meta charset="utf-8"/>
<title>FileSaver.js Demo</title>
<link rel="stylesheet" type="text/css" href="https://raw.github.com/eligrey/FileSaver.js/master/demo/demo.css"/>
</head>
<body>
<h1><a href="https://github.com/eligrey/FileSaver.js">FileSaver.js</a> Demo</h1>
<p>
The following examples demonstrate how it is possible to generate and save any type of data right in the browser using the W3C <code>saveAs()</code> <a href="http://www.w3.org/TR/file-writer-api/#the-filesaver-interface">FileSaver</a> interface, without contacting any servers.
</p>
<section id="image-demo">
	<h2>Saving an image</h2>
	<canvas class="input" id="canvas" width="500" height="300"/>
	<form id="canvas-options">
		<label>Filename: <input type="text" class="filename" id="canvas-filename" placeholder="doodle"/>.png</label>
		<input type="submit" value="Save"/>
		<input type="button" id="canvas-clear" value="Clear"/>
	</form>
</section>
<section id="text-demo">
	<h2>Saving text</h2>
	<textarea class="input" id="text" placeholder="Once upon a time..."/>
	<form id="text-options">
		<label>Filename: <input type="text" class="filename" id="text-filename" placeholder="a plain document"/>.txt</label>
		<input type="submit" value="Save"/>
	</form>
</section>
<section id="html-demo">
	<h2>Saving rich text</h2>
	<div class="input" id="html" contenteditable="">
		<h3>Some example rich text</h3>
		<ul>
			<li><del>Plain</del> <ins>Boring</ins> text.</li>
			<li><em>Emphasized text!</em></li>
			<li><strong>Strong text!</strong></li>
			<li>
				<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="70" height="70">
					<circle cx="35" cy="35" r="35" fill="red"/>
					<text x="10" y="40">image</text>
				</svg>
			</li>
			<li><a href="https://github.com/eligrey/FileSaver.js">A link.</a></li>
		</ul>
	</div>
	<form id="html-options">
		<label>Filename: <input type="text" class="filename" id="html-filename" placeholder="a rich document"/>.xhtml</label>
		<input type="submit" value="Save"/>
	</form>
</section>
<section id="faq">
	<h1>FAQ</h1>
	<dl>
		<dt>Why isn't my filename saved?</dt>
		<dd>
			<p>
			Saving with filenames is only available in browsers that natively support either <code><a href="http://www.w3.org/TR/file-system-api/#using-localfilesystem">LocalFileSystem</a></code> or <code><a href="http://www.w3.org/TR/file-writer-api/#the-filesaver-interface">FileSaver</a></code>, such as <a href="http://www.chromium.org/getting-involved/dev-channel">Google Chrome 14 dev</a>. To enable <code>LocalFileSystem</code> in Google Chrome 14 dev, launch the browser with the <code>--allow-file-access-from-files</code> and <code>--unlimited-quota-for-files</code> flags.
			</p>
		</dd>
	</dl>
</section>
<script type="application/ecmascript" async="" src="https://raw.github.com/eligrey/BlobBuilder.js/master/BlobBuilder.min.js"/>
<script type="application/ecmascript" async="" src="https://raw.github.com/eligrey/canvas-toBlob.js/master/canvas-toBlob.min.js"/>
<script type="application/ecmascript" async="" src="https://raw.github.com/eligrey/FileSaver.js/master/FileSaver.min.js"/>
<script type="application/ecmascript" async="" src="https://raw.github.com/eligrey/FileSaver.js/master/demo/demo.min.js"/>
</body>
</html><commit_msg>Removed instructions for enabling LocalFileSystem in Chrome 14+ now that it's enabled by default.<commit_after>﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US-x-Hixie">
<head>
<meta charset="utf-8"/>
<title>FileSaver.js Demo</title>
<link rel="stylesheet" type="text/css" href="https://raw.github.com/eligrey/FileSaver.js/master/demo/demo.css"/>
</head>
<body>
<h1><a href="https://github.com/eligrey/FileSaver.js">FileSaver.js</a> Demo</h1>
<p>
The following examples demonstrate how it is possible to generate and save any type of data right in the browser using the W3C <code>saveAs()</code> <a href="http://www.w3.org/TR/file-writer-api/#the-filesaver-interface">FileSaver</a> interface, without contacting any servers.
</p>
<section id="image-demo">
	<h2>Saving an image</h2>
	<canvas class="input" id="canvas" width="500" height="300"/>
	<form id="canvas-options">
		<label>Filename: <input type="text" class="filename" id="canvas-filename" placeholder="doodle"/>.png</label>
		<input type="submit" value="Save"/>
		<input type="button" id="canvas-clear" value="Clear"/>
	</form>
</section>
<section id="text-demo">
	<h2>Saving text</h2>
	<textarea class="input" id="text" placeholder="Once upon a time..."/>
	<form id="text-options">
		<label>Filename: <input type="text" class="filename" id="text-filename" placeholder="a plain document"/>.txt</label>
		<input type="submit" value="Save"/>
	</form>
</section>
<section id="html-demo">
	<h2>Saving rich text</h2>
	<div class="input" id="html" contenteditable="">
		<h3>Some example rich text</h3>
		<ul>
			<li><del>Plain</del> <ins>Boring</ins> text.</li>
			<li><em>Emphasized text!</em></li>
			<li><strong>Strong text!</strong></li>
			<li>
				<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="70" height="70">
					<circle cx="35" cy="35" r="35" fill="red"/>
					<text x="10" y="40">image</text>
				</svg>
			</li>
			<li><a href="https://github.com/eligrey/FileSaver.js">A link.</a></li>
		</ul>
	</div>
	<form id="html-options">
		<label>Filename: <input type="text" class="filename" id="html-filename" placeholder="a rich document"/>.xhtml</label>
		<input type="submit" value="Save"/>
	</form>
</section>
<section id="faq">
	<h1>FAQ</h1>
	<dl>
		<dt>Why isn't my filename saved?</dt>
		<dd>
			<p>
			Saving with filenames is only available in browsers that natively support either <code><a href="http://www.w3.org/TR/file-system-api/#using-localfilesystem">LocalFileSystem</a></code> or <code><a href="http://www.w3.org/TR/file-writer-api/#the-filesaver-interface">FileSaver</a></code>, such as <a href="http://www.chromium.org/getting-involved/dev-channel">Google Chrome 14 dev</a>.
			</p>
		</dd>
	</dl>
</section>
<script type="application/ecmascript" async="" src="https://raw.github.com/eligrey/BlobBuilder.js/master/BlobBuilder.min.js"/>
<script type="application/ecmascript" async="" src="https://raw.github.com/eligrey/canvas-toBlob.js/master/canvas-toBlob.min.js"/>
<script type="application/ecmascript" async="" src="https://raw.github.com/eligrey/FileSaver.js/master/FileSaver.min.js"/>
<script type="application/ecmascript" async="" src="https://raw.github.com/eligrey/FileSaver.js/master/demo/demo.min.js"/>
</body>
</html>
{'fraction_non_alphanumeric': 0.21352905569007263, 'fraction_numerical': 0.016041162227602906, 'mean_word_length': 5.046660567246112, 'pattern_counts': {'":': 0, '<': 231, '<?xml version=': 0, '>': 231, 'https://': 14, 'lorem ipsum': 0, 'www.': 12, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3256405', 'n_tokens_mistral': 2556, 'n_tokens_neox': 2376, 'n_words': 469}