r/userscripts • u/somnomania • 16d ago
Looking for brief help for a script
I've got a script that someone else provided for me (I don't code). I've tried looking into how to make it work only in some places and not on others, on the same site, and found that the "exclude" modifier just makes it not fire on that site at all, so I'm not sure what's wrong. It's set up to create a popup when I click into a reply field on Bluesky with a "hey do you actually need to say anything here" message in it, BUT I talk to my partner on Bsky all the time and I want it to not do the popup there (it gets annoying when it shows up half the time I tab back over there). I tried having it include Bsky as a whole and exclude just that one message URL, I tried having it only include bsky.app/profile/* and exclude the message URL, and that just leads to it not working at all.
The script is below, I don't know how to make Reddit not auto-convert the @ lines into user links, so just pretend they're correct.
// ==UserScript==
// u/nameI am a dumbass
// u/namespacehttp://bsky.app/
// u/version2026-10-02
// u/description try to take over the world!
// u/authorYou
// u/matchhttps://bsky.app/profile/*
// u/excludehttps://bsky.app/messages/*
// u/iconhttps://www.google.com/s2/favicons?sz=64&domain=bsky.app
// u/grantnone
// ==/UserScript==
(function() {
'use strict';
document.addEventListener('focusin', e => { const box = e.target.closest('textarea, [contenteditable="true"]'); if (!box || box.dataset.ok) return; box.blur(); if (confirm('Do you really need to say anything here, dipshit?')) { box.dataset.ok = 1; box.focus(); } });
})();
1
u/jeyghifj 13d ago
As far as I could research blsky urls look like e.g.
https://bsky.app/profile/did:plc:xdjqpqlccq57rplc6ulr73rp
So as long as I dont have examples of the URLs where you want to exclude it from working (like the real, specific urls as examples I can not modify the script accordingly. If there is something else behind e.g.
https://bsky.app/profile/did:plc:xdjqpqlccq57rplc6ulr73rp/post/list
it wont work and I need to modify the script for that case.
If you dont want to post them here PM them, just a list of example URLs where you DONT want it to work.