ATProtoTweaks.js
edited
1// ==UserScript==
2// @name ATProto Tweaks
3// @namespace http://tampermonkey.net/
4// @version 1.72
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://deer.social/*
12// @match https://sky.thebull.app/*
13// @match https://zepplin.social/*
14// @match https://blacksky.community/*
15// @match https://social.daniela.lol/*
16// @match https://catsky.social/*
17// @grant none
18// @run-at document-end
19// ==/UserScript==
20
21(function() {
22 'use strict';
23
24 const style = document.createElement('style');
25 style.textContent = `
26 /* 1. Enlarge like button */
27 button[aria-label^="Like ("] svg {
28 width: 28px !important;
29 height: 28px !important;
30 }
31
32 /* 2. Hide follower count on profile pages */
33 a[href$="/followers"] {
34 display: none !important;
35 }
36
37 /* 3. Hide bookmarks button */
38 button[data-testid="postBookmarkBtn"] {
39 display: none !important;
40 }
41
42 /* Pulsating like icon for bulk button */
43 @keyframes pulsate {
44 0% { opacity: 0.6; transform: scale(1); }
45 50% { opacity: 1; transform: scale(1.12); }
46 100% { opacity: 0.6; transform: scale(1); }
47 }
48
49 #bulk-like-btn {
50 display: flex;
51 align-items: center;
52 margin: 0 8px;
53 padding: 6px 8px;
54 background: transparent;
55 border: none;
56 cursor: pointer;
57 animation: pulsate 2s infinite ease-in-out;
58 }
59
60 #bulk-like-btn svg {
61 width: 24px;
62 height: 24px;
63 fill: #FF5B5B;
64 }
65 `;
66 document.head.appendChild(style);
67
68 let timer;
69
70 function addBulkLike() {
71 const nav = document.querySelector('nav[role="navigation"]');
72 if (nav && !nav.querySelector('#bulk-like-btn')) {
73 const btn = document.createElement('button');
74 btn.id = 'bulk-like-btn';
75 btn.title = 'Like all visible posts';
76 btn.innerHTML = `
77 <svg viewBox="0 0 24 24">
78 <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"/>
79 </svg>
80 `;
81 btn.onclick = () => {
82 [...document.querySelectorAll('button[aria-label^="Like ("]')]
83 .filter(b => b.offsetParent)
84 .forEach(b => b.click());
85 };
86 nav.appendChild(btn);
87 }
88 }
89
90 function observe() {
91 clearTimeout(timer);
92 timer = setTimeout(addBulkLike, 300);
93 }
94
95 new MutationObserver(observe).observe(document.body, { childList: true, subtree: true });
96 observe();
97})();