Convert a tweet URL to a bird.makeup toot one
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <!DOCTYPE html>
  2. <html language="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="description" content="Birdsite->bird.makeup URL converter">
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8. <meta property="og:title" content="Bird2Makeup">
  9. <meta property="og:type" content="website">
  10. <meta property="og:description" content="Birdsite->bird.makeup URL converter">
  11. <meta property="og:url" content="https://nandn.org.il/bird2makeup.html">
  12. <meta property="og:image" content="https://nandn.org.il/bird2makeup.png">
  13. <title>Bird2Makeup</title>
  14. </head>
  15. <body>
  16. <div class="container">
  17. <h1><img src="bird2makeup.png" style="width:1.5em" />Bird2Makeup</h1>
  18. <input id="in" autofocus style="width:80%" placeholder="Example: https://x.com/realDonaldTrump/status/2028505632123326484" />
  19. <button readonly onclick="bird2makeup()">Bird2Makeup</button>
  20. <input id="out" readonly style="width:80%" value="please enter a tweet URL above ^" />
  21. <ul>
  22. <li>Paste tweet URL into top field, and click button (or hit Enter)</li>
  23. <li>If it's a valid tweet URL, its equivalent <a target="_blank" href="https://bird.makeup">bird.makeup</a> URL would appear at the bottom field, and get copied into the clipboard</li>
  24. <li>Paste it into the search field of your mastodon page or app<em>(no guarantee such a toot exists at bird.makeup)</em></li>
  25. </ul>
  26. <p>This service is here simply because <a target="_blank" href="https://bird.makeup">bird.makeup</a> doesn't provide it.
  27. </div>
  28. <script>
  29. function bird2makeup() {
  30. try
  31. {
  32. let result = document.getElementById("in").value.match("https:\/\/[^/]*\/([^/*]*)\/status\/([^/]*)");
  33. document.getElementById("out").value = `https://bird.makeup/@${result[1]}/${result[2]}`;
  34. document.getElementById("out").select();
  35. navigator.clipboard.writeText(document.getElementById("out").value);
  36. } catch {
  37. document.getElementById("out").value = "please enter a VALID tweet URL above ^";
  38. document.getElementById("in").select();
  39. }
  40. }
  41. document.getElementById("in").addEventListener("keydown", (event) => {
  42. bird2makeup();
  43. });
  44. </script>
  45. </body>
  46. </html>