File size: 3,034 Bytes
a880854
b4935ee
 
a880854
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b4935ee
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

<!DOCTYPE html>
<html>
    <head>
        <title>Paste to Markdown</title>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta charset="utf-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <link href="favicon.ico" rel="icon" type="image/x-icon">
        <link rel="stylesheet" href="bootstrap.css">
        <script src="to-markdown.js"></script>
        <script src="clipboard2markdown.js"></script>
        <style>
            h2 {
                font-size: 22px;
                font-style: italic;
            }
            body {
                background-attachment: fixed;
                background-image: url('background.svg');
                background-position: right 10% bottom 20%;
                background-repeat: no-repeat;
                background-size: 20em;
                margin-bottom: 10vh;
                margin-top: 10vh;
            }
            #pastebin {
                opacity: 0.01;
                width: 100%;
                height: 1px;
                overflow: hidden;
            }
            #output {
                border: none;
                background: transparent;
                font-family: Consolas, "Liberation Mono", Courier, monospace;
                font-size: 13px;
                line-height: 19px;
                min-height: 78vh;
                overflow: auto;
                padding: 6px 10px;
                resize: none;
                width: 100%;
            }
            @media (prefers-color-scheme: dark) {
                body { 
                    background-image: url('background-dark.svg');
                    background-color: #222; 
                    color:white; 
                }
                code {
                    color: #ff7a9c;
                    background-color: #0e0609;
                }
                a {
                    color: #8fcbff;
                }
            }
        </style>
    </head>
    <body>
        <div class="container">
            <section id="info">
                <h1>Paste to Markdown</h1>
                <h2>Instructions</h2>
                <ol>
                    <li>Find the text to convert to Markdown (<i>e.g.</i>, in another browser tab)</li>
                    <li>Copy it to the clipboard (<code>Ctrl+C</code>, or <code>&#8984;+C</code> on Mac)</li>
                    <li>Paste it into this window (<code>Ctrl+V</code>, or <code>&#8984;+V</code> on Mac)</li>
                    <li>The converted Markdown will appear!</li>
                </ol>
                <p>The conversion is carried out by <a href="https://github.com/domchristie/to-markdown">to-markdown</a>, a Markdown converter written in JavaScript and running locally in the browser.</p>
            </section>
            <div contenteditable="true" id="pastebin"></div>
            <section class="hidden" id="wrapper">
                <textarea id="output"></textarea>
            </section>
        </div>
    </body>
</html>