-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
461 lines (435 loc) · 24.3 KB
/
Copy pathindex.html
File metadata and controls
461 lines (435 loc) · 24.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover" />
<title>Python Tutor — Offline-first Python practice with a local AI tutor</title>
<meta name="description" content="Offline-first Python tutor with a local AI mentor. Two-command install, then fully offline with Ollama and Gemma. Source-backed docs when online. No accounts, no cloud, no telemetry." />
<meta name="keywords" content="Python tutor, offline Python, local AI tutor, learn Python, Ollama, Gemma, private LLM, local-first, open source" />
<meta name="author" content="Stew Alexander" />
<meta name="robots" content="index, follow, max-image-preview:large" />
<meta name="theme-color" content="#0c0c0d" />
<meta name="color-scheme" content="dark" />
<link rel="canonical" href="https://stewalexander-com.github.io/python-tutor/" />
<!-- Favicons -->
<link rel="icon" type="image/svg+xml" href="./assets/favicon.svg" />
<link rel="icon" type="image/png" sizes="32x32" href="./assets/favicon-32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="./assets/favicon-16.png" />
<link rel="shortcut icon" href="./assets/favicon.ico" />
<link rel="apple-touch-icon" sizes="180x180" href="./assets/apple-touch-icon.png" />
<link rel="mask-icon" href="./assets/favicon.svg" color="#e8a13b" />
<link rel="manifest" href="./site.webmanifest" />
<meta name="apple-mobile-web-app-title" content="Python Tutor" />
<meta name="application-name" content="Python Tutor" />
<!-- Open Graph / Facebook / LinkedIn / Messenger / iMessage -->
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Python Tutor" />
<meta property="og:locale" content="en_US" />
<meta property="og:title" content="Python Tutor — Offline-first Python practice with a local AI tutor" />
<meta property="og:description" content="Two-command install, then fully offline with Ollama and Gemma. Lessons, a real code lab, and an AI mentor — all on your laptop. No accounts. No cloud. No telemetry." />
<meta property="og:url" content="https://stewalexander-com.github.io/python-tutor/" />
<meta property="og:image" content="https://stewalexander-com.github.io/python-tutor/assets/og-image.png" />
<meta property="og:image:secure_url" content="https://stewalexander-com.github.io/python-tutor/assets/og-image.png" />
<meta property="og:image:type" content="image/png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:image:alt" content="Python Tutor — Private Python practice with a local AI tutor. Two commands: ./install.sh and ./run.sh --open-browser." />
<!-- Twitter / X -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Python Tutor — Offline-first Python practice with a local AI tutor" />
<meta name="twitter:description" content="Two-command install, then fully offline with Ollama and Gemma. Lessons, a real code lab, and an AI mentor — all on your laptop. No accounts. No cloud. No telemetry." />
<meta name="twitter:image" content="https://stewalexander-com.github.io/python-tutor/assets/og-image.png" />
<meta name="twitter:image:alt" content="Python Tutor — Private Python practice with a local AI tutor. Two commands: ./install.sh and ./run.sh --open-browser." />
<!-- JSON-LD structured data -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"name": "Python Tutor",
"description": "Offline-first Python tutor with a local AI mentor. Two-command install, then fully offline with Ollama and Gemma. Source-backed docs when online.",
"url": "https://stewalexander-com.github.io/python-tutor/",
"image": "https://stewalexander-com.github.io/python-tutor/assets/og-image.png",
"applicationCategory": "EducationalApplication",
"operatingSystem": "macOS, Linux, Windows",
"license": "https://opensource.org/licenses/MIT",
"codeRepository": "https://github.com/StewAlexander-com/python-tutor",
"offers": { "@type": "Offer", "price": "0", "priceCurrency": "USD" }
}
</script>
<link rel="stylesheet" href="./style.css" />
</head>
<body>
<a class="skip-link" href="#main">Skip to content</a>
<header class="topbar">
<a class="brand" href="#top" aria-label="Python Tutor home">
<svg class="brand__mark" width="28" height="28" viewBox="0 0 64 64" aria-hidden="true">
<rect x="6" y="6" width="52" height="52" rx="12" fill="#1a1a1b"/>
<rect x="6" y="6" width="52" height="52" rx="12" fill="none" stroke="#2a2a2c" stroke-width="1"/>
<path d="M18 22 L26 32 L18 42" fill="none" stroke="#e8a13b" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"/>
<rect x="31" y="39" width="14" height="3.5" rx="1" fill="#e8a13b"/>
</svg>
<span class="brand__name">Python Tutor<span class="brand__dot">.</span></span>
</a>
<nav class="topbar__nav" aria-label="Primary">
<a class="topbar__link" href="#why">Why</a>
<a class="topbar__link" href="#loop">How it works</a>
<a class="topbar__link" href="#screens">See it</a>
<a class="topbar__link" href="#start">Install</a>
</nav>
<a class="btn btn--ghost topbar__cta" href="https://github.com/StewAlexander-com/python-tutor" rel="noopener">
<svg width="16" height="16" viewBox="0 0 24 24" aria-hidden="true" fill="currentColor"><path d="M12 .5C5.65.5.5 5.65.5 12c0 5.08 3.29 9.39 7.86 10.91.58.11.79-.25.79-.56v-2c-3.2.7-3.88-1.37-3.88-1.37-.52-1.32-1.27-1.67-1.27-1.67-1.04-.71.08-.7.08-.7 1.15.08 1.76 1.18 1.76 1.18 1.02 1.75 2.68 1.25 3.34.96.1-.74.4-1.25.72-1.54-2.55-.29-5.24-1.28-5.24-5.69 0-1.26.45-2.29 1.18-3.1-.12-.29-.51-1.45.11-3.03 0 0 .97-.31 3.18 1.18a11.04 11.04 0 0 1 5.8 0c2.21-1.49 3.18-1.18 3.18-1.18.62 1.58.23 2.74.11 3.03.73.81 1.18 1.84 1.18 3.1 0 4.42-2.7 5.39-5.27 5.68.41.36.78 1.05.78 2.12v3.14c0 .31.21.68.8.56A11.5 11.5 0 0 0 23.5 12C23.5 5.65 18.35.5 12 .5z"/></svg>
<span>Repo</span>
</a>
</header>
<main id="main">
<!-- ============ HERO ============ -->
<section id="top" class="hero">
<div class="hero__bg" aria-hidden="true"></div>
<div class="hero__inner">
<div class="hero__copy">
<div class="eyebrow">
<span class="dot" aria-hidden="true"></span>
<span>Local-first · Open source · MIT</span>
</div>
<h1 class="hero__title">
Private Python practice<br/>
<span class="accent">with a local AI tutor.</span>
</h1>
<p class="hero__lede">
Lessons, an interactive code lab, and a chat mentor — powered by a
local LLM (Gemma via Ollama). Your code and your questions
<strong>never leave your laptop</strong>.
</p>
<div class="hero__cta">
<a class="btn btn--primary" href="#start">
<span>Install in 3 commands</span>
<svg width="14" height="14" viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14M13 5l7 7-7 7"/></svg>
</a>
<a class="btn btn--ghost" href="https://github.com/StewAlexander-com/python-tutor" rel="noopener">View on GitHub</a>
</div>
<ul class="hero__chips" aria-label="At a glance">
<li>No accounts</li>
<li>No cloud</li>
<li>No telemetry</li>
<li>Works on a plane</li>
</ul>
</div>
<!-- Simplified app mockup, evoking the real UI -->
<div class="hero__mock" role="img" aria-label="Python Tutor app preview: lesson, code lab with Run output, and floating tutor chat.">
<div class="mock">
<div class="mock__chrome">
<span class="mock__dot mock__dot--r"></span>
<span class="mock__dot mock__dot--y"></span>
<span class="mock__dot mock__dot--g"></span>
<span class="mock__url">localhost:8001</span>
</div>
<div class="mock__body">
<aside class="mock__side">
<div class="mock__side-title">Foundations</div>
<ul class="mock__list">
<li class="is-active">Variables & Types</li>
<li>Numbers & Math</li>
<li>Strings</li>
<li>Lists</li>
<li>Dicts</li>
<li class="is-muted">+ 41 more</li>
</ul>
</aside>
<section class="mock__main">
<h3 class="mock__h">Variables & Types</h3>
<p class="mock__p">Names point at values. Values know their own type — variables don't.</p>
<div class="mock__lab">
<div class="mock__lab-head">
<span class="mock__tag">code lab</span>
<span class="mock__run">▶ Run</span>
</div>
<pre class="mock__code"><span class="t-com"># try it</span>
<span class="t-fn">name</span> = <span class="t-str">"Ada"</span>
<span class="t-fn">age</span> = <span class="t-num">36</span>
<span class="t-kw">print</span>(<span class="t-fn">name</span>, <span class="t-fn">age</span>)</pre>
<div class="mock__out">
<span class="mock__ok">✓ Ran</span>
<code>Ada 36</code>
</div>
</div>
<div class="mock__chat" aria-hidden="true">
<div class="mock__chat-head">
<span class="mock__chat-title">Ask tutor</span>
<span class="mock__chat-x">×</span>
</div>
<div class="mock__chat-body">
<div class="mock__bubble mock__bubble--you">Why isn't <code>age</code> typed?</div>
<div class="mock__bubble mock__bubble--bot">Values carry the type — names are just labels. <a class="mock__cite">docs.python.org →</a></div>
</div>
</div>
</section>
</div>
</div>
</div>
</div>
</section>
<!-- ============ WHY (useful / private / credible) ============ -->
<section id="why" class="rows">
<div class="rows__inner">
<h2 class="section__title">Built for learning, not for harvesting data.</h2>
<ul class="rows__list">
<li class="row">
<div class="row__icon" aria-hidden="true">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 7h16M4 12h10M4 17h16"/></svg>
</div>
<div class="row__text">
<h3>Useful</h3>
<p>A guided 46-section Python-foundations curriculum, an inline code lab that <em>actually runs</em> your code, and exercises with visible <em>and</em> hidden tests.</p>
</div>
</li>
<li class="row">
<div class="row__icon" aria-hidden="true">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="10" width="16" height="11" rx="2"/><path d="M8 10V7a4 4 0 0 1 8 0v3"/></svg>
</div>
<div class="row__text">
<h3>Private</h3>
<p>The model runs on your machine via Ollama. No accounts, no cloud calls, no telemetry. Pull the plug — the UI keeps working.</p>
</div>
</li>
<li class="row">
<div class="row__icon" aria-hidden="true">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2l9 4-9 4-9-4 9-4z"/><path d="M3 10l9 4 9-4"/><path d="M3 14l9 4 9-4"/></svg>
</div>
<div class="row__text">
<h3>Credible</h3>
<p>The tutor cites only <strong>official Python docs</strong> from a curated allowlist. URLs are never invented by the LLM — they come from an in-repo map and are HEAD-checked when online.</p>
</div>
</li>
</ul>
</div>
</section>
<!-- ============ LOCAL-FIRST LOOP ============ -->
<section id="loop" class="loop">
<div class="loop__inner">
<h2 class="section__title">The local-first loop.</h2>
<p class="section__lede">Four steps. All of them happen on your laptop.</p>
<ol class="loop__steps">
<li class="step">
<span class="step__num">1</span>
<span class="step__label">Write Python</span>
<span class="step__sub">In a real editor, in the page.</span>
</li>
<li class="step__arrow" aria-hidden="true">→</li>
<li class="step">
<span class="step__num">2</span>
<span class="step__label">Run locally</span>
<span class="step__sub">Sandboxed subprocess. Real stdout, real stderr.</span>
</li>
<li class="step__arrow" aria-hidden="true">→</li>
<li class="step">
<span class="step__num">3</span>
<span class="step__label">Get feedback</span>
<span class="step__sub">Tutor sees your output, gives a verdict + a next step.</span>
</li>
<li class="step__arrow" aria-hidden="true">→</li>
<li class="step">
<span class="step__num">4</span>
<span class="step__label">Offline practice</span>
<span class="step__sub">Plane, café, air-gapped lab — same loop.</span>
</li>
</ol>
</div>
</section>
<!-- ============ SCREENS ============ -->
<section id="screens" class="screens">
<div class="screens__inner">
<h2 class="section__title">See it.</h2>
<p class="section__lede">A 30-second tour of the UI, lab, and tutor.</p>
<div class="screens__grid">
<figure class="shot">
<img loading="lazy" src="./assets/screenshots/01-home.png" alt="Landing page with two learning paths." />
<figcaption><strong>Land.</strong> Beginner or quick reference. Tutor is one tap away.</figcaption>
</figure>
<figure class="shot">
<img loading="lazy" src="./assets/screenshots/03-section-view.png" alt="Variables & Types lesson in Teaching mode." />
<figcaption><strong>Read.</strong> The <i>why</i> first, then the syntax.</figcaption>
</figure>
<figure class="shot">
<img loading="lazy" src="./assets/screenshots/04-code-lab-run.png" alt="Inline code lab with a Python program and a 'Ran cleanly' output." />
<figcaption><strong>Run.</strong> Real stdout/stderr. Not faked.</figcaption>
</figure>
<figure class="shot">
<img loading="lazy" src="./assets/screenshots/05-evaluate-feedback.png" alt="Tutor evaluation with verdict, next step, and Python docs references." />
<figcaption><strong>Evaluate.</strong> Verdict, next step, official docs.</figcaption>
</figure>
<figure class="shot">
<img loading="lazy" src="./assets/screenshots/06-tutor-chat.png" alt="Floating chat panel mid-conversation about Python variables." />
<figcaption><strong>Ask.</strong> Free-form questions, with your code in scope.</figcaption>
</figure>
<figure class="shot">
<img loading="lazy" src="./assets/screenshots/02-lesson-browser.png" alt="Lesson browser with 46 sections, filterable." />
<figcaption><strong>Browse.</strong> 46 sections. In order or by topic.</figcaption>
</figure>
</div>
</div>
</section>
<!-- ============ START (clone + install + run) ============ -->
<section id="start" class="start">
<div class="start__inner">
<h2 class="section__title">Clone, install, run.</h2>
<p class="section__lede">
Three short commands and you're at
<code>http://localhost:8001/</code>.
macOS, Linux, or Windows. Python 3.10+.
</p>
<ol class="start__steps">
<li class="start__step">
<div class="start__step-head">
<span class="start__step-num">1</span>
<h3 class="start__step-title">Clone the repo</h3>
</div>
<p class="start__step-sub">HTTPS works without a GitHub login. <code>gh repo clone</code> works too if you use the GitHub CLI.</p>
<div class="start__code start__code--with-copy">
<pre><code id="cmd-clone">git clone https://github.com/StewAlexander-com/python-tutor.git
cd python-tutor</code></pre>
<button class="copy-btn" type="button" data-copy-target="cmd-clone" aria-label="Copy clone commands">Copy</button>
</div>
</li>
<li class="start__step">
<div class="start__step-head">
<span class="start__step-num">2</span>
<h3 class="start__step-title">Install</h3>
</div>
<p class="start__step-sub">
Sets up a Python venv and dependencies. Any host-level step
(Ollama install, daemon start, model pull, app launch) is an
<strong>opt-in y/N prompt</strong> — press Enter and nothing
changes on your host.
</p>
<div class="start__os-label">macOS / Linux</div>
<div class="start__code start__code--with-copy">
<pre><code id="cmd-install">./install.sh</code></pre>
<button class="copy-btn" type="button" data-copy-target="cmd-install" aria-label="Copy install command (macOS / Linux)">Copy</button>
</div>
<div class="start__os-label">Windows (PowerShell)</div>
<div class="start__code start__code--with-copy">
<pre><code id="cmd-install-win">.\install.ps1</code></pre>
<button class="copy-btn" type="button" data-copy-target="cmd-install-win" aria-label="Copy install command (Windows)">Copy</button>
</div>
</li>
<li class="start__step">
<div class="start__step-head">
<span class="start__step-num">3</span>
<h3 class="start__step-title">Run & open in your browser</h3>
</div>
<p class="start__step-sub"><code>--open-browser</code> / <code>-OpenBrowser</code> pops the tab once <code>/api/health</code> is green.</p>
<div class="start__os-label">macOS / Linux</div>
<div class="start__code start__code--with-copy">
<pre><code id="cmd-run">./run.sh --open-browser</code></pre>
<button class="copy-btn" type="button" data-copy-target="cmd-run" aria-label="Copy run command (macOS / Linux)">Copy</button>
</div>
<div class="start__os-label">Windows (PowerShell)</div>
<div class="start__code start__code--with-copy">
<pre><code id="cmd-run-win">.\run.ps1 -OpenBrowser</code></pre>
<button class="copy-btn" type="button" data-copy-target="cmd-run-win" aria-label="Copy run command (Windows)">Copy</button>
</div>
<p class="start__step-sub start__step-sub--muted">
Or just <code>./run.sh</code> / <code>.\run.ps1</code> and open <code>http://localhost:8001/</code> yourself.
</p>
</li>
</ol>
<details class="start__more">
<summary>Common variations</summary>
<div class="start__os-label">macOS / Linux</div>
<div class="start__code start__code--with-copy">
<pre><code id="cmd-more"><span class="t-com"># trusted host: install Ollama, pull model, launch — no prompts</span>
./install.sh --yes
<span class="t-com"># CI / air-gapped: never prompt, default everything to "no"</span>
./install.sh --noninteractive
<span class="t-com"># Python-only setup (skip every Ollama probe)</span>
./install.sh --skip-ollama
<span class="t-com"># pick a different model or port</span>
./install.sh --model llama3.1:8b
./run.sh --port 8042</code></pre>
<button class="copy-btn" type="button" data-copy-target="cmd-more" aria-label="Copy variation commands (macOS / Linux)">Copy</button>
</div>
<div class="start__os-label">Windows (PowerShell)</div>
<div class="start__code start__code--with-copy">
<pre><code id="cmd-more-win"><span class="t-com"># trusted host: install Ollama (via winget), pull model, launch</span>
.\install.ps1 -Yes
<span class="t-com"># CI / air-gapped: never prompt, default everything to "no"</span>
.\install.ps1 -NonInteractive
<span class="t-com"># Python-only setup (skip every Ollama probe)</span>
.\install.ps1 -SkipOllama
<span class="t-com"># pick a different model or port</span>
.\install.ps1 -Model llama3.1:8b
.\run.ps1 -Port 8042
<span class="t-com"># if PowerShell blocks the script:</span>
powershell -ExecutionPolicy Bypass -File .\install.ps1</code></pre>
<button class="copy-btn" type="button" data-copy-target="cmd-more-win" aria-label="Copy variation commands (Windows)">Copy</button>
</div>
</details>
<div class="start__links">
<a class="btn btn--primary" href="https://github.com/StewAlexander-com/python-tutor" rel="noopener">Open the repo</a>
<a class="btn btn--ghost" href="https://github.com/StewAlexander-com/python-tutor#readme" rel="noopener">Read the README</a>
<a class="btn btn--ghost" href="https://github.com/StewAlexander-com/python-tutor/issues" rel="noopener">File an issue</a>
</div>
</div>
</section>
</main>
<footer class="foot">
<div class="foot__inner">
<div class="foot__brand">
<svg width="20" height="20" viewBox="0 0 64 64" aria-hidden="true">
<rect x="6" y="6" width="52" height="52" rx="12" fill="#1a1a1b"/>
<path d="M18 22 L26 32 L18 42" fill="none" stroke="#e8a13b" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"/>
<rect x="31" y="39" width="14" height="3.5" rx="1" fill="#e8a13b"/>
</svg>
<span>Python Tutor</span>
</div>
<nav class="foot__nav" aria-label="Footer">
<a href="https://github.com/StewAlexander-com/python-tutor" rel="noopener">GitHub</a>
<a href="https://github.com/StewAlexander-com/python-tutor#a-word-on-safety" rel="noopener">Safety</a>
<a href="https://github.com/StewAlexander-com/python-tutor/blob/main/docs/architecture.md" rel="noopener">Architecture</a>
<a href="https://github.com/StewAlexander-com/python-tutor/blob/main/curriculum/python-foundations.md" rel="noopener">Curriculum</a>
</nav>
<p class="foot__note">MIT-licensed. Frontend adapted from <a href="https://github.com/StewAlexander-com/Python-Power-User" rel="noopener">Python Power User</a>.</p>
</div>
</footer>
<script>
(function () {
var buttons = document.querySelectorAll('.copy-btn[data-copy-target]');
buttons.forEach(function (btn) {
btn.addEventListener('click', function () {
var id = btn.getAttribute('data-copy-target');
var node = document.getElementById(id);
if (!node) return;
var text = node.innerText.replace(/ /g, ' ');
var done = function () {
var original = btn.textContent;
btn.textContent = 'Copied';
btn.classList.add('is-copied');
setTimeout(function () {
btn.textContent = original;
btn.classList.remove('is-copied');
}, 1400);
};
if (navigator.clipboard && navigator.clipboard.writeText) {
navigator.clipboard.writeText(text).then(done, function () {
fallbackCopy(text); done();
});
} else {
fallbackCopy(text); done();
}
});
});
function fallbackCopy(text) {
var ta = document.createElement('textarea');
ta.value = text;
ta.setAttribute('readonly', '');
ta.style.position = 'absolute';
ta.style.left = '-9999px';
document.body.appendChild(ta);
ta.select();
try { document.execCommand('copy'); } catch (e) {}
document.body.removeChild(ta);
}
})();
</script>
</body>
</html>