this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

add show all bookmarklet

alice f94757a3 a7d9d393

+81 -1
public/see-no-evil-monkey.png

This is a binary file and will not be displayed.

src/app/likebomb/highlight.tsx src/utils/highlight.tsx
+1 -1
src/app/likebomb/page.tsx
··· 1 1 import type { Metadata } from 'next'; 2 2 import React from 'react'; 3 - import { CodeBlock } from './highlight'; 3 + import { CodeBlock } from '../../utils/highlight'; 4 4 // @ts-expect-error 5 5 import bookmarkleter from 'bookmarkleter'; 6 6
src/app/likebomb/styles.module.css src/utils/styles.module.css
+80
src/app/showall/page.tsx
··· 1 + import type { Metadata } from 'next'; 2 + import React from 'react'; 3 + import { CodeBlock } from '../../utils/highlight'; 4 + // @ts-expect-error 5 + import bookmarkleter from 'bookmarkleter'; 6 + 7 + export function generateMetadata(): Metadata { 8 + const title = `Show All Replies`; 9 + const description = 'Quickly show all posts from people you muted in a thread.'; 10 + const icon = '/see-no-evil-monkey.png'; 11 + const absoluteUrl = `https://showall.bsky.sh`; 12 + const absoluteIconUrl = `https://bsky.sh${icon}`; 13 + 14 + return { 15 + title: title, 16 + description: description, 17 + icons: { 18 + icon: icon, 19 + apple: icon, 20 + shortcut: icon, 21 + }, 22 + openGraph: { 23 + title: title, 24 + description: description, 25 + url: absoluteUrl, 26 + siteName: title, 27 + images: [ 28 + { 29 + url: absoluteIconUrl, 30 + }, 31 + ], 32 + }, 33 + twitter: { 34 + card: 'summary', 35 + site: absoluteUrl, 36 + title: title, 37 + description: description, 38 + creator: '@alice.bsky.sh', 39 + images: absoluteIconUrl, 40 + }, 41 + }; 42 + } 43 + 44 + const code = `[...document.querySelectorAll('div')] 45 + .filter(div => div.innerHTML.trim() === 'Show post') 46 + .filter(div => !!div.offsetParent) 47 + .forEach(e => e.click());`; 48 + 49 + const bookmarklet = bookmarkleter(code, { 50 + urlencode: true, 51 + iife: true, 52 + minify: true, 53 + }); 54 + 55 + const bookmarkletHref = `<a href="${bookmarklet}">🙈 show all 🙈</a>`; 56 + 57 + export default function Page() { 58 + return ( 59 + <div style={{ width: '800px;' }}> 60 + <h1>Show All Replies</h1> 61 + <div> 62 + Drag this to your bookmarks bar. Clicking it will show all replies in a Bluesky thread from people you muted. 63 + <br /> 64 + <br /> 65 + <div 66 + dangerouslySetInnerHTML={{ 67 + __html: bookmarkletHref, 68 + }} 69 + ></div> 70 + <br /> 71 + Bookmarklet created with <a href="https://chriszarate.github.io/bookmarkleter/">Bookmarkleter</a>. 72 + </div> 73 + <br /> 74 + <div> 75 + Unminified source code: 76 + <CodeBlock code={code} language="javascript" /> 77 + </div> 78 + </div> 79 + ); 80 + }