Tools: Text-a-friend section (SMS + WhatsApp + messenger share, per angle)
5 SMS-sized low-pressure messages (general moving link + one per angle video, each carrying the matching ?v= landing link) with one-tap launchers: sms: body pre-fill, wa.me text pre-fill, t.me/share with the member''s Mini App invite (angle-matched), Copy for Messenger/IG. Hrefs rebuilt on personalization. Chatbot canned answer + AI prompt synced. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -41,6 +41,23 @@
|
||||
if(mine){ note.style.display='block'; const s=note.querySelector('strong'); if(s)s.textContent='#'+id; const l=note.querySelector('.pnl'); if(l)l.textContent=mine; }
|
||||
else note.style.display='none';
|
||||
}
|
||||
// Text-a-friend share buttons: rebuild launcher hrefs from the (already
|
||||
// personalized) message in the card's swipe block. SMS/WhatsApp carry the
|
||||
// full text with the website angle link; Telegram shares the member's
|
||||
// t.me Mini App invite (matching angle) with a short lead-in.
|
||||
document.querySelectorAll('.share-row').forEach(row=>{
|
||||
const card=row.closest('.tool-card');
|
||||
const pre=card&&card.querySelector('pre.swipe');
|
||||
const msg=pre?pre.textContent:'';
|
||||
const enc=encodeURIComponent(msg);
|
||||
row.querySelectorAll('a.share-sms').forEach(a=>{a.href='sms:?&body='+enc;});
|
||||
row.querySelectorAll('a.share-wa').forEach(a=>{a.href='https://wa.me/?text='+enc;});
|
||||
row.querySelectorAll('a.share-tg').forEach(a=>{
|
||||
const angle=row.dataset.angle||'';
|
||||
const tgu=id?('https://t.me/RMCircleBot/join?startapp='+id+(angle?'_'+angle:'')):'https://rmcircle.team';
|
||||
a.href='https://t.me/share/url?url='+encodeURIComponent(tgu)+'&text='+encodeURIComponent(row.dataset.tglead||'');
|
||||
});
|
||||
});
|
||||
if(id){ try{localStorage.setItem('rmc.toolsId',id);}catch(e){} }
|
||||
}
|
||||
(function initId(){
|
||||
|
||||
Reference in New Issue
Block a user