Enlarge like button, hide follower count and bookmark, add pulsating bulk-like button
ATProtoTweaks.js
edited
1// ==UserScript==
2// @name ATProto Tweaks
3// @namespace http://tampermonkey.net/
4// @version 1.73
5// @description Enlarge like button, hide follower count, add pulsating bulk-like button
6// @author https://PSingletary.com
7// @downloadURL https://tangled.sh/strings/psingletary.com/3lw3oofrvgj22/raw
8// @updateURL https://tangled.sh/strings/psingletary.com/3lw3oofrvgj22/raw
9// @license MIT
10// @match https://bsky.app/*
11// @match https://blacksky.community/*
12// @match https://witchsky.app/*
13// @grant none
14// @run-at document-end
15// ==/UserScript==
16
17(function() {
18 'use strict';
19
20 const style = document.createElement('style');
21 style.textContent = `
22 /* 1. Enlarge like button */
23 button[aria-label^="Like ("] svg {
24 width: 28px !important;
25 height: 28px !important;
26 }
27
28 /* 2. Hide follower count on profile pages */
29 a[href$="/followers"] {
30 display: none !important;
31 }
32
33 /* 3. Hide bookmarks button */
34 button[data-testid="postBookmarkBtn"] {
35 display: none !important;
36 }
37
38 /* Pulsating like icon for bulk button */
39 @keyframes pulsate {
40 0% { opacity: 0.6; transform: scale(1); }
41 50% { opacity: 1; transform: scale(1.12); }
42 100% { opacity: 0.6; transform: scale(1); }
43 }
44
45 #bulk-like-btn {
46 display: flex;
47 align-items: center;
48 margin: 0 8px;
49 padding: 6px 8px;
50 background: transparent;
51 border: none;
52 cursor: pointer;
53 animation: pulsate 2s infinite ease-in-out;
54 }
55
56 #bulk-like-btn svg {
57 width: 24px;
58 height: 24px;
59 fill: #FF5B5B;
60 }
61 `;
62 document.head.appendChild(style);
63
64 let timer;
65
66 function addBulkLike() {
67 const nav = document.querySelector('nav[role="navigation"]');
68 if (nav && !nav.querySelector('#bulk-like-btn')) {
69 const btn = document.createElement('button');
70 btn.id = 'bulk-like-btn';
71 btn.title = 'Like all visible posts';
72 btn.innerHTML = `
73 <svg viewBox="0 0 24 24">
74 <path d="M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 22 8.5 22 5.42 19.58 3 16.5 3z"/>
75 </svg>
76 `;
77 btn.onclick = () => {
78 [...document.querySelectorAll('button[aria-label^="Like ("]')]
79 .filter(b => b.offsetParent)
80 .forEach(b => b.click());
81 };
82 nav.appendChild(btn);
83 }
84 }
85
86 function observe() {
87 clearTimeout(timer);
88 timer = setTimeout(addBulkLike, 300);
89 }
90
91 new MutationObserver(observe).observe(document.body, { childList: true, subtree: true });
92 observe();
93})();