Something went wrong. Try again.
small bsky embedder @ boobsky.app - kinda mid but works - mirror of git.fomx.gay/rooot/embedthing
Something went wrong. Try again.
3.7 kB · 118 lines
HTML
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118<!DOCTYPE html><html><head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="darkreader" content="meow"> <title>embedthing</title> <style> * { margin: 0; padding: 0; } body { background-color: #11111b; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; } h1, h2, span, p { color: #cdd6f4; text-align: center; } a, .r { color: #f5c2e7; } .g { color: #a6e3a1; } .b { color: #89b4fa; } input { margin-right: 1px !important; flex: 0 0 85%; } input, button { padding: 12px; margin: 0 auto; border: none; outline: none; border-radius: 5px; background-color: #1e1e2e; color: #cdd6f4; text-align: center; } input:focus::placeholder { color: transparent; } #notif { display: block; margin-top: 80px; text-align: center; } #inp { position: absolute; display: flex; margin-top: 20px; width: 50%; left: 50%; transform: translateX(-50%); cursor: pointer; } footer { position: absolute; bottom: 0; width: 100%; margin-bottom: 8px; } </style> <script> function msg(msg) { notif.innerHTML = msg; } function go() { let link = link_input.value; let url; try { url = new URL(link); } catch (e) { msg('<span class="r">invalid link!</span>'); return; } const bsky_appviews = ["bsky.app", "deer.social", "boobsky.app", "catsky.social", "bitchsky.app", "witchsky.app", window.location.host]; if (!bsky_appviews.includes(url.hostname)) { msg('<span class="r">this is not a bsky.app link!</span>'); return; } url.host = window.location.host; link_input.value = url.href; navigator.clipboard.writeText(url.href); msg('<span class="g">link copied to clipboard!</span>'); } function setup() { link_input.value = ""; document.body.onpaste = function (e) { let text = e.clipboardData.getData("text"); link_input.value = text; go(); } } </script></head><body onload="setup()"> <h1>embedthing</h1> <h2>simply replace <span class="b">bsky.app</span> in your link with <span class="r">boobsky.app</span></h2> <h2>to get them to <span class="g">embed</span> properly!</h2> <div id="inp"> <input type="text" id="link_input" placeholder="or paste your link here c:"> <button onclick="go()">go!</button> </div> <span id="notif"></span> <footer> <p> <span>made with <span class="r">❤</span> by <a href="https://bsky.app/profile/rooot.gay" target="_blank">rooot</a> :3</span> <span>- <a href="https://git.fomx.gay/rooot/embedthing" target="_blank">source code</a></span> <span>- like this project? consider <a href="https://buymeacoffee.com/rooot" target="_blank">supporting me!</a></span> </p> </footer></body></html>