-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add PeerTube support #112
Comments
The thing is we have a dropdown again, no tab opening, so it technically needs a content script just like new Mastodon. the comment field click triggers this: (from https://video.blender.org/)
So some UX thoughts need to be done here in any case. |
Ah in any case thanks for trying to contribute. If you have any questions feel free to ask. Basically you may need to register a new type and handler for your Fediverse site and add it here to the others:
That detect handler does all the detection work and is called automatically, just use the existing ones as a reference: That, however, is only for catching URL redirections. Now the tricky part is just ahead… The tricky part is then to have a content script like https://github.com/rugk/mastodon-simplified-federation/blob/main/src/content_script/mastodonInject.js that intercepts the button clicks or whatever you actually want.
The thing is to make sure you cause no false-positives (properly detect the website is an instance of the service) striking a balance between it being constrained enough like that, but also being flexible enough so that a website/slightly-modified or differently configured instance or an instance that may be running a more recent/upgraded software version still works. Sounds complicated but well, you'll see that and if there happens to be a breaking change in the Fediverse software then well… this add-on needs to be fixed again and upgraded. The aim of all that content script currently just is to trigger opening a window/popup so the URL catching/detection you implemented earlier triggers. See here e.g.:
See #86 when that changes. But for now, this is the basic way. |
As that is a good basic explanation to get started, I just dumped it to https://github.com/rugk/mastodon-simplified-federation/wiki/Development, though GitHub does not do inline code citations there unfortunately. |
Background
This extension solves the problem for Mastodon, the same problem we have for PeerTube too.
Proposed solution
Extend it with support for PeerTube.
Alternatives
I tried to fork it and to rewrite it but once I did I realized that it's very big and I would need to understand a lot of details to be able to do it so after two days of trying I gave up for now.
Another alternative would be to rewrite it into a framework with plugin support so people could write simple plugins to make it work with other software like PixelFed, Lemmy, PeerTube, /kbin and all other fediverse apps which have similar problems.
Additional context
The text was updated successfully, but these errors were encountered: