Skip to content

Instantly share code, notes, and snippets.

@austinlparker
Created December 16, 2024 15:36
Show Gist options
  • Save austinlparker/73eff5d7d99ec3eac79f9315916bf8b2 to your computer and use it in GitHub Desktop.
Save austinlparker/73eff5d7d99ec3eac79f9315916bf8b2 to your computer and use it in GitHub Desktop.
hide reposts in bluesky following feed (arc boost/userscript)
// replace the <USER DISPLAY NAME> with the display name of the user you wish to hide reposts from in your following feed
function processElements() {
document.querySelectorAll('[aria-label="Reposted by <USER DISPLAY NAME>"]').forEach(element => {
let parent = element.parentElement;
while (parent) {
if (parent.tagName === 'DIV' && !parent.className) {
parent.className = 'hide';
break;
}
parent = parent.parentElement;
}
});
}
const observer = new MutationObserver(mutations => {
for (const mutation of mutations) {
mutation.addedNodes.forEach(node => {
if (node.nodeType === Node.ELEMENT_NODE) {
processElements();
}
});
}
});
observer.observe(document.body, {
childList: true,
subtree: true
});
processElements();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment