Alternate account: @woelkchen@piefed.world

  • 5 posts
  • 9 comments
Joined 3 years ago
Cake day: June 12th, 2023

Similar to my last submission but not specific to YouTube, this is a very basic bookmarklet that does nothing but create a submission to Lemmy of the currently open website. It does not fill out the thumbnail and hopes that Lemmy will generate a proper one on its own.

You may need to replace “lemmy.world” in the script with the domain of the Lemmy instance that you use.

Source: https://pastefy.app/kKChBKoK

How you add a bookmarklet is by creating a new web browser bookmark and pasting the JavaScript code where the URL would go. Something like this:

The way Lemmy works, you may be prompted to login again. Lemmy can do weird things like ignore your session when referrer isn’t sent. Still easier than filling out the video title yourself.

There is also the “hidden” feature that you may enter a community ID as a URL parameter (currently empty). I think the ID for a specific community varies depending on your home instance. On Lemmy.World this community here is 7133, for example. You can find out the ID when you’re on the Create Post page and have a look at the address bar:

This may be useful, should you want to submit to a specific communtiy directly.

Code is public domain.

Apparently YouTube blocked the IPs of the several Lemmy servers such as Lemmy.World, so you cannot just conveniently post a video and get title and thumbnail filled out. Basically, these tasks need to be done locally instead of the Lemmy server. If you use a Lemmy client such as Thunder and use the share sheet from YouTube with it, the title is already filled out.

Here are two bookmarklets you can use. The way bookmarklets work is that you create a new web browser bookmark and paste the JavaScript code where the URL would go. Something like this:

The first bookmarklet is a generic one and should work for everyone regardless of browser choice. When in the YouTube browser tab, you just click on it and a new tab opens to create a new post. Title and thumbnail are filled out.

You need to replace “lemmy.world” with the domain name of your Lemmy instance.

I cannot post the code directly in code markup because stupid Cloudflare thinks I’m doing an SQL Injection. 🙄

Code: https://pastefy.app/SgP7s3Cp

The second bookmarklet is for when you use Firefox Multi-Account Containers, for example when you’re logged into YouTube using a dedicated account and you don’t want it to affect tabs with Google services you might use with a different account. If you don’t have that requirement, just use the first script.

Code: https://pastefy.app/TKEbB7Jx

The way Lemmy works, you may be prompted to login again. Lemmy can do weird things like ignore your session when referrer isn’t sent. Still easier than filling out the video title yourself, IMO.

Code is public domain.

!fediverse@lemmy.world is not a place to file your grievances with “free speech”, disrupting users, moderation, etc.

If you have problems with users: File complaints to the mods or just block them.

If you have problems with mods: File complaints with admins of the instance or just migrate to an alternative community.

If you have problems with an entire instance: Just leave it.