Kaynağa Gözat

Initial commit

master
The Dod 1 gün önce
işleme
af8d388116
3 değiştirilmiş dosya ile 52 ekleme ve 0 silme
  1. 3
    0
      README.md
  2. BIN
      bird2makeup.png
  3. 49
    0
      index.html

+ 3
- 0
README.md Dosyayı Görüntüle

@@ -0,0 +1,3 @@
1
+**Bird2makeup** is a single-static-html-page app to convert a tweet's URL to its equivalent [bird.makeup](https://bird.makeup) one (no guarantee it exists).
2
+
3
+view [index.html](index.html) in a browser for more details.

BIN
bird2makeup.png Dosyayı Görüntüle


+ 49
- 0
index.html Dosyayı Görüntüle

@@ -0,0 +1,49 @@
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
+
14
+  <title>Bird2Makeup</title>
15
+</head>
16
+<body>
17
+  <div class="container">
18
+<h1><img src="bird2makeup.png" style="width:1.5em" />Bird2Makeup</h1>
19
+<input id="in" autofocus style="width:80%" placeholder="Example: https://x.com/realDonaldTrump/status/2028505632123326484" />
20
+<button readonly onclick="bird2makeup()">Bird2Makeup</button>
21
+<input id="out" readonly style="width:80%" value="please enter a tweet URL above ^" />
22
+    <ul>
23
+        <li>Paste tweet URL into top field, and click button (or hit Enter)</li>
24
+        <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>
25
+        <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>
26
+    </ul>
27
+<p>This service is here simply because <a target="_blank" href="https://bird.makeup">bird.makeup</a> doesn't provide it.
28
+  </div>
29
+<script>
30
+function bird2makeup() {
31
+try
32
+    {
33
+        let result = document.getElementById("in").value.match("https:\/\/[^/]*\/([^/*]*)\/status\/([^/]*)");
34
+        document.getElementById("out").value = `https://bird.makeup/@${result[1]}/${result[2]}`;
35
+        document.getElementById("out").select();
36
+        navigator.clipboard.writeText(document.getElementById("out").value);
37
+    } catch {
38
+        document.getElementById("out").value = "please enter a VALID tweet URL above ^";
39
+        document.getElementById("in").select();
40
+    }
41
+}
42
+document.getElementById("in").addEventListener("keydown", (event) => {
43
+    bird2makeup();
44
+});
45
+</script>
46
+
47
+
48
+</body>
49
+</html>

Loading…
İptal
Kaydet