Bluesky Image/Video Download Button

Adds a download button to Bluesky images and videos. Built off coredumperror's script with a few improvements.

< Opiniones de Bluesky Image/Video Download Button

Pregunta o comentario

§
Publicado: 18/10/2024

If anyone can tell me a better way to do lines 95 and 96, I'm all ears. I hate the stupid obfuscation methods modern sites use.

§
Publicado: 20/10/2024
Editado: 20/10/2024

Its info is possibly stored in the js object, generated by vue or similar thing

I'm not familiar to this too

Take one of my script for example, I got the path of target id from a classless div by brute force search the source code in console debugger

   let cards = document.querySelectorAll("div[data-v-485ecbd6]:has(>.card):not(.fixedLink)");
   let id = card?.__vue__.$vnode.componentOptions.propsData.card.mblog.id;
§
Publicado: 20/10/2024

Oh jeez, that's a hell of a work around. I'll look around to see if there's something like that I can do. I really don't want to keep coming back to update selectors just because they decided to add another empty div randomly to their hierarchies.

§
Publicado: 21/10/2024
Editado: 21/10/2024
targetNode = node.querySelector(".r-13awgt0:has(> .r-1d5kdc7)");

Still relies on the obfuscated classnames, and isn't as performant as a stricter selector, but seems to work for now.

§
Publicado: 21/10/2024

I'm currently testing '[data-testid="followingFeedPage-feed-flatlist"]' and it seems to be a safe one.

§
Publicado: 21/10/2024

I found a really silly way to do it and I hate it, but here it goes into the 1.4 code :)

                targetNode = $(node).find('[data-testid$="-flatlist"]').get(0);
                headerNode = node.querySelector('[href="/settings"]');
                if (targetNode && !targetSpotted) {
                    imgObserver.observe(targetNode.parentElement.parentElement.parentElement.parentElement.parentElement,config);
                    targetSpotted = true;
                }
                if (headerNode && !headerSpotted) {
                    headerNode = headerNode.parentElement;
§
Publicado: 21/10/2024

On v1.4, filenaming button being located in left menu above profile picture makes it not usable if the window is small which collapses the left bar. See attached image. Tradeoff between this and it being always accessible I guess. Could alternatively just remain only in the account page where it was before.

Also the v1.4 targetNode selector doesn't work for individual post pages, e.g. https://bsky.app/profile/96yottea.bsky.social/post/3l6ytr3bbh42b. v1.1 seemed to work for every page type, unless I missed something.

Thanks for making me an author! But I don't think that lets me contribute directly without making another fork, unless I'm missing something. I don't have an "Update" tab on greasyfork like I do with scripts that I create myself.

§
Publicado: 21/10/2024

On v1.4, filenaming button being located in left menu above profile picture makes it not usable if the window is small which collapses the left bar. See attached image. Tradeoff between this and it being always accessible I guess. Could alternatively just remain only in the account page where it was before.

I'll move it somewhere else, also just realized I made this unnecessarily complex.

§
Publicado: 21/10/2024

Sounds good. Btw I figured out the author thing, missed the associated email.

§
Publicado: 21/10/2024

v1.5 is out, opinions?

§
Publicado: 21/10/2024
Editado: 21/10/2024

Seems great! New location for Filenaming makes sense.

I see a minor "conflict" with the Imagus extension - adds a non-functional download button to very top left when I hover an image with it. If I get around to patching that for myself I'll push it here.

Publicar respuesta

Inicia sesión para responder.