PluginProbe
ActivityPub / 3.2.4
ActivityPub v3.2.4
9.3.1 9.3.0 9.2.2 9.2.1 9.2.0 9.1.0 9.0.2 9.0.1 9.0.0 8.3.0 8.2.1 8.2.0 8.1.1 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.2.0 1.3.0 2.0.0 2.0.1 2.1.0 2.1.1 All 160 releases
activitypub / templates / toolbox.php

toolbox.php in ActivityPub 3.2.4, at templates/toolbox.php

66 lines 3.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <div class="card activitypub" id="activitypub">
2 <h2><?php esc_html_e( '⁂ Fediverse Bookmarklet', 'activitypub' ); ?></h2>
3 <p>
4 <?php esc_html_e( 'This lightweight bookmarklet makes it simple to reply to content on any webpage that supports ActivityPub, enhancing your interaction on the fediverse.', 'activitypub' ); ?>
5 </p>
6 <form>
7 <h3><?php esc_html_e( 'Install Bookmarklet', 'activitypub' ); ?></h3>
8 <p><?php esc_html_e( 'Drag and drop this button to your browser’s bookmark bar or save this bookmarklet to reply to posts on other websites from your blog! When visiting a post on another site, click the bookmarklet to start a reply.', 'activitypub' ); ?></p>
9 <p class="activitypub-bookmarklet-wrapper">
10 <a class="activitypub-bookmarklet button" onclick="return false;" href="<?php echo esc_html( \Activitypub\get_reply_intent_uri() ); ?>" style="cursor: grab;">
11 <?php // translators: The host (domain) of the Blog ?>
12 <?php printf( esc_html__( 'Reply from %s', 'activitypub' ), esc_attr( \wp_parse_url( \home_url(), PHP_URL_HOST ) ) ); ?>
13 </a>
14 </p>
15 <div class="activitypub-code-wrap clear" id="activitypub-code-wrap">
16 <p id="activitypub-code-desc">
17 <?php esc_html_e( 'Or copy the following code and create a new bookmark. Paste the code into the new bookmark&#8217;s URL field.', 'activitypub' ); ?>
18 </p>
19 <p>
20 <textarea id="activitypub-bookmarklet-code" class="large-text activitypub-code" rows="5" readonly="readonly" aria-labelledby="activitypub-code-desc"><?php echo esc_html( \Activitypub\get_reply_intent_uri() ); ?></textarea>
21 </p>
22 <p><span class="dashicons dashicons-clipboard"></span> <a href="javascript:;" class="copy-activitypub-bookmarklet-code" style="cursor: copy;"><?php esc_html_e( 'Copy to clipboard', 'activitypub' ); ?></a></p>
23 </div>
24 <script>
25 jQuery( document ).ready( function( $ ) {
26 var $copyActivitypubBookmarkletCode = $( '.copy-activitypub-bookmarklet-code' );
27 $copyActivitypubBookmarkletCode.on( 'click', function( event ) {
28 // Get the text field
29 var copyText = document.getElementById("activitypub-bookmarklet-code");
30
31 // Select the text field
32 copyText.select();
33 copyText.setSelectionRange(0, 99999); // For mobile devices
34
35 // Copy the text inside the text field
36 navigator.clipboard.writeText(copyText.value);
37 });
38 });
39 </script>
40 </form>
41 <h3><?php esc_html_e( 'Reply Intent', 'activitypub' ); ?></h3>
42 <p><?php esc_html_e( 'The Reply Intent makes it easy for you to compose and post a Reply to your audience from a link on the Fediverse (Mastodon, Pixelfed, ...).', 'activitypub' ); ?></p>
43 <h4><?php esc_html_e( 'URL', 'activitypub' ); ?></h4>
44 <p><code><?php echo esc_url( \admin_url( 'post-new.php' ) ); ?></code></p>
45 <h4><?php esc_html_e( 'Query parameters', 'activitypub' ); ?></h4>
46 <table class="wp-list-table widefat fixed striped table-view-list">
47 <thead>
48 <tr>
49 <th>
50 <?php esc_html_e( 'Parameter', 'activitypub' ); ?>
51 </th>
52 <th>
53 <?php esc_html_e( 'Description', 'activitypub' ); ?>
54 </th>
55 </tr>
56 </thead>
57 <tbody>
58 <tr>
59 <td>in_reply_to</td>
60 <td><?php esc_html_e( 'The URL of the content you want to reply to.', 'activitypub' ); ?></td>
61 </tr>
62 </tbody>
63 </table>
64 <p><?php esc_html_e( 'There might be more query parameters in the future.', 'activitypub' ); ?></p>
65 </div>
66