aboutsummaryrefslogtreecommitdiffstats
path: root/src/index.html
blob: f5510a26297a6885fc07fd3bdc4821b61461746d (plain) (blame)
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
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="color-scheme" content="light dark">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="pragma" content="no-cache">
    <title>kj-clipboard</title>
    <link rel="icon" type="image/svg+xml" href="/favicon.svg">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/kj-sh604/noir.css@latest/out/noir.min.css">
    <style>
        textarea {
            font-family: monospace;
            font-size: 0.95rem;
            padding: 0.75rem;
            resize: vertical;
            box-sizing: border-box;
            tab-size: 4;
        }

        textarea:not([rows]) {
            width: 100%;
            min-height: 30rem;
        }

        .controls {
            display: flex;
            gap: 0.5rem;
            margin-top: 0.75rem;
            flex-wrap: wrap;
            align-items: center;
        }

        button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        input[type="password"] {
            font-family: inherit;
            font-size: 0.9rem;
        }

        input[type="password"]:focus {
            outline: none;
        }

        label {
            font-size: 0.9rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.3rem;
        }

        .result {
            margin-top: 1rem;
            padding: 0.75rem;
            border: 1px solid #444;
            border-radius: 4px;
            display: none;
        }

        .result a {
            word-break: break-all;
        }

        .copy-link-btn {
            margin-left: 0.5rem;
            font-size: 0.85rem;
            padding: 0.25rem 0.5rem;
        }

        .spacer {
            flex-grow: 1;
        }

        #lang-select {
            display: none;
        }

        .status {
            font-size: 0.85rem;
            margin-top: 0.5rem;
        }
    </style>
</head>

<body>
    <h1>kj-clipboard</h1>
    <p>no frills, just a public clipboard on the internet that you can use to share snippets around... that's it.</p>
    <textarea id="content" placeholder="paste or type something here..." autofocus spellcheck="false"></textarea>
    <div class="controls"><button id="get-link-btn" type="button" title="generate snippet link">generate
            link</button><span class="spacer"></span><label><input type="checkbox" id="is-code">is this code?
        </label><select id="lang-select">
            <option value="">(auto)</option>
        </select></div><br><input type="password" id="passphrase" autocomplete="off"
        placeholder="passphrase (optional)"><small>&nbsp;encrypted with <a href="https://github.com/kj-sh604/mojicrypt"
            target="_blank" rel="noopener noreferrer">mojicrypt</a></small>
    <div class="result" id="result"><span>link: <a id="result-link" href="#" target="_blank"
                rel="noopener noreferrer"></a></span><button id="copy-link-btn" type="button"
            class="copy-link-btn">copy
            link</button></div>
    <div class="status" id="status"></div>
    <script src="main.js" defer></script>
</body>

</html>