Commit cb0cf1da7b3874924353117f31270b1187559fdd
Merge branch 'master' of git.sr.ht:~romuloalves/website
romuloalves committed on 4/20/2020, 11:02:43 PMParent: 8aea3d23d4451e56e0de079459173a384addf300
Parent: d28b1230833c80ff3fbc697f30cd5e51de0fe115
Files changed
index.html | changed |
index.html | |||
---|---|---|---|
@@ -85,9 +85,9 @@ | |||
85 | 85 … | <h1>You can find me on...</h1> | |
86 | 86 … | <ul> | |
87 | 87 … | <li> | |
88 | 88 … | <span>Secure Scuttlebutt</span> | |
89 | - <code>@xr/Q/zqaEwmmd4wg8xRU1TrMLQhc9qBqNCioCqmv1vQ=.ed25519</code> | ||
89 … | + <code class="click-select">@xr/Q/zqaEwmmd4wg8xRU1TrMLQhc9qBqNCioCqmv1vQ=.ed25519</code> | ||
90 | 90 … | </li> | |
91 | 91 … | <li> | |
92 | 92 … | <span>Twitter</span> | |
93 | 93 … | <code> | |
@@ -138,6 +138,26 @@ | |||
138 | 138 … | </a> | |
139 | 139 … | </li> | |
140 | 140 … | </ul> | |
141 | 141 … | </section> | |
142 … | + <script type="text/javascript"> | ||
143 … | + var itemsToSelect = document.querySelectorAll('.click-select'); | ||
144 … | + | ||
145 … | + for (let index = 0; index < itemsToSelect.length; index++) { | ||
146 … | + var element = itemsToSelect[index]; | ||
147 … | + | ||
148 … | + element.addEventListener('click', function() { | ||
149 … | + var selection = window.getSelection(); | ||
150 … | + | ||
151 … | + if (selection.rangeCount > 0) { | ||
152 … | + selection.removeAllRanges(); | ||
153 … | + } | ||
154 … | + | ||
155 … | + var range = document.createRange(); | ||
156 … | + | ||
157 … | + range.selectNode(element); | ||
158 … | + selection.addRange(range); | ||
159 … | + }); | ||
160 … | + } | ||
161 … | + </script> | ||
142 | 162 … | </body> | |
143 | 163 … | </html> |
Built with git-ssb-web