summaryrefslogtreecommitdiff
path: root/layouts/_partials/posts
diff options
context:
space:
mode:
authorBigCoke233 <hi@guhub.cn>2026-01-31 12:14:13 +0800
committerBigCoke233 <hi@guhub.cn>2026-01-31 12:14:13 +0800
commit2a05c35369a70e5a3df0c08cc1a19ccd0bd02f64 (patch)
tree6c595e4c0a65ef7ebf98732fe0c5b6efe2bfcaf1 /layouts/_partials/posts
parent4824d55ba64aed81e9323a514ecb6a1aa9156032 (diff)
refactor: bundle fediform.js
Diffstat (limited to 'layouts/_partials/posts')
-rw-r--r--layouts/_partials/posts/fediverse-form.html21
1 files changed, 0 insertions, 21 deletions
diff --git a/layouts/_partials/posts/fediverse-form.html b/layouts/_partials/posts/fediverse-form.html
index f9998d1d..1ddc09a0 100644
--- a/layouts/_partials/posts/fediverse-form.html
+++ b/layouts/_partials/posts/fediverse-form.html
@@ -1,28 +1,7 @@
{{ if .Params.toot }}
-
<div class="flex flex-col gap-2">
<h4 class="text-sm font-semibold m-0">{{ T "actionMenu.fediverse" }}</h4>
<input type="text" id="fediverse-instance" placeholder="{{ T "actionMenu.fediversePlaceholder" }}" class="text-sm px-2 py-1 border border-neutral-300 dark:border-neutral-600 rounded bg-transparent">
<button onclick="openInFediverse()" class="text-xs px-2 py-1 bg-neutral-200 dark:bg-neutral-600 rounded hover:bg-neutral-300 dark:hover:bg-neutral-500 transition-colors">{{ T "actionMenu.openToot" }}</button>
</div>
-
-<script>
-const instanceInput = document.getElementById('fediverse-instance')
-const savedInstance = localStorage.getItem("geedeapro.fediInstance")
-if (savedInstance) instanceInput.value = savedInstance
-
-function openInFediverse() {
- const instance = instanceInput.value.trim();
- const tootUrl = '{{ .Params.toot }}';
-
- let url = tootUrl
- if (instance) {
- url = 'https://' + instance + '/authorize_interaction?uri=' + encodeURIComponent(tootUrl);
- // save instance url to localStorage
- localStorage.setItem("geedeapro.fediInstance", instance)
- }
- window.open(url, '_blank');
-}
-</script>
-
{{ end }}