Badge share sheet: Massifly option (copies the post, opens the feed composer)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-13 17:23:57 -05:00
parent 8e415c3cf4
commit f7b911bab6
3 changed files with 9 additions and 2 deletions
+7
View File
@@ -173,6 +173,7 @@
+ '<h3 style="margin:0 0 4px">Share your ' + b.label + ' badge</h3><p class="muted small" style="margin:0 0 12px">Each option shares your badge page, which shows the image and your join link.</p>'
+ '<div style="display:grid;grid-template-columns:1fr 1fr;gap:8px">'
+ links.map(l => '<a class="btn sec small" target="_blank" rel="noopener" href="' + l[1] + '" style="text-align:center">' + l[0] + '</a>').join('')
+ '<button type="button" class="btn sec small" data-sh="massifly">Massifly</button>'
+ (navigator.share ? '<button type="button" class="btn sec small" data-sh="native">More…</button>' : '')
+ '<button type="button" class="btn sec small" data-sh="copy">Copy link</button>'
+ '<button type="button" class="btn sec small" data-sh="save">Save image</button>'
@@ -187,6 +188,12 @@
const a = document.createElement('a'); a.href = URL.createObjectURL(blob); a.download = 'instantadpay-' + b.label.toLowerCase() + '-badge.jpg'; a.click(); setTimeout(() => URL.revokeObjectURL(a.href), 5000);
IAP.status('Your ' + b.label + ' badge is saved.', 'ok');
});
// Massifly has no share intent: copy the post text + link, then open the feed composer (Marty, 2026-09-13)
back.querySelector('[data-sh="massifly"]').addEventListener('click', async () => {
try { await navigator.clipboard.writeText(text + ' ' + page); IAP.status('Post copied. Paste it into the Massifly composer; the badge preview appears from the link.', 'ok'); }
catch (e) { IAP.status('Copy this into Massifly: ' + text + ' ' + page, 'ok'); }
window.open('https://massifly.com/account', '_blank', 'noopener');
});
const nat = back.querySelector('[data-sh="native"]');
if (nat) nat.addEventListener('click', async () => {
try {
+1 -1
View File
@@ -915,7 +915,7 @@
<script src="/assets/common.js?v=20260913a"></script>
<script src="/assets/wallet.js?v=20260911a"></script>
<script src="/assets/promo.js?v=20260911a"></script>
<script src="/assets/my.js?v=20260913i"></script>
<script src="/assets/my.js?v=20260913j"></script>
<script src="/assets/chat.js?v=20260907l"></script>
</body>
</html>