mirror of
https://github.com/Automattic/wordpress-activitypub
synced 2024-10-18 18:23:32 +00:00
b240589e78
* add basic reply context support * UX improvements * remove unused style file * built * Add bookmarklet! * add build * small UX tweaks * add toolbox box * improved text * optimized block filter * add in-reply-to to activity * refactor to add inboxes using filters and retrieve/add inboxes of `in-reply-to` links * renamings * plugins do not like slashed IDs * rename to match new get param --------- Co-authored-by: Matt Wiebe <wiebe@automattic.com>
1 line
No EOL
508 B
JavaScript
1 line
No EOL
508 B
JavaScript
(()=>{"use strict";const t=window.wp.plugins,e=window.wp.blocks,n=window.wp.data,i=window.wp.blockEditor,r=window.wp.element;(0,t.registerPlugin)("activitypub-reply-intent",{render:()=>{const[t,o]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{if(t)return;const r=new URLSearchParams(window.location.search).get("in_reply_to");r&&setTimeout((()=>{const t=(0,e.createBlock)("activitypub/reply",{url:r}),o=(0,n.dispatch)(i.store);o.insertBlock(t),o.insertAfterBlock(t.clientId)}),200),o(!0)}),[t]),null}})})(); |