Skip to content
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

feat: inject content script to handle interactions from remote v4 Mastodon instances #84

Merged
merged 13 commits into from
Nov 23, 2022

Conversation

hueyy
Copy link
Contributor

@hueyy hueyy commented Nov 21, 2022

To be merged only after #82 is merged.

Resolves #77

Copy link
Owner

@rugk rugk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again thanks a lot and here some mostly code style-related comments.

BTW you marked this as WIP, what is still missing here?

src/background/modules/AutoRemoteFollow.js Outdated Show resolved Hide resolved
src/content_script/mastodonInject.js Outdated Show resolved Hide resolved
src/content_script/mastodonInject.js Outdated Show resolved Hide resolved
src/content_script/mastodonInject.js Outdated Show resolved Hide resolved
src/content_script/mastodonInject.js Outdated Show resolved Hide resolved
src/content_script/mastodonInject.js Outdated Show resolved Hide resolved
src/content_script/mastodonInject.js Outdated Show resolved Hide resolved
src/content_script/mastodonInject.js Show resolved Hide resolved
src/content_script/mastodonInject.js Outdated Show resolved Hide resolved
@hueyy hueyy marked this pull request as ready for review November 22, 2022 02:35
.eslintrc Show resolved Hide resolved
@hueyy hueyy requested a review from rugk November 22, 2022 02:39
src/content_script/mastodonInject.js Show resolved Hide resolved
src/content_script/mastodonInject.js Show resolved Hide resolved
.eslintrc Show resolved Hide resolved
@hueyy hueyy requested a review from rugk November 23, 2022 04:57
@rugk rugk merged commit 0c4d2c5 into rugk:master Nov 23, 2022
@rugk
Copy link
Owner

rugk commented Nov 23, 2022

Oh merged, but @hueyy sorry testing it I noticed some bugs/things:

  1. It does not work if you open only the toot in a window. See e.g. https://mastodon.social/@drewtoothpaste/109393612157338955
    My first testing shows, this is likely due to the first filtering for the feed/that only considers the feed #mastodon .columns-area__panels__main may be another selector that targets this. Or no, it is somewhere different?
  2. When I navigate back from a detailed toot site (via Mastodon's back button or also via the browser's back button) and click an interaction button, it does not work either:
    grafik
    Actually, also when I then click the follow button, it has the same effect?
  3. When I click on the interaction button, and the automatic redirection works, and the target instance is a Mastodon v4 instance, it does seem to have problems: It goes to https://chaos.social/authorize_interaction?uri=https://mastodon.social/users/Gargron/statuses/109394489902371854/activity, which looks okay AFAIK, but it only shows me "Could not find remote account."
    Hmm, sometimes the redirection also succeeds, and ends at https://chaos.social/web/@elhotzo@mastodon.social/109395625884664825 e.g., but even then the toot is not shown, but the sidebar shows a 404 error only. I tried this with a toot that provably already exists on my target instance, as such it should be possible to be shown, but it shows only 404.

So unfortunately, I cannot release it as it is.

@hueyy
Copy link
Contributor Author

hueyy commented Nov 24, 2022

@rugk yes, my bad, I accounted for the detailed status page in the inject function but not in the MutationObserver. Will send in a PR to fix this. I think that should resolve (1) and (2).

I can't seem to reproduce (3), even on https://mastodon.social/@drewtoothpaste/109393612157338955. It sounds very odd because yes, the URL looks right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Mastodon v4
3 participants