-
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
Do not open popup when not needed #86
Comments
@hueyy are you interested in having a look here for further improving the whole mechanism? It goes into simpler WebExtension stuff. There are also maintenance tasks like #50 and I've found another extension that did the same as we did (unfortunately only now), that may have done things better or can at least be used for inspiration: raikasdev/mastodon4-redirect#6 |
Yes I can, but will only be able to get to this next week or so.
…On Tue, 13 Dec 2022, 23:47 rugk, ***@***.***> wrote:
@hueyy <https://github.com/hueyy> are you interested in having a look
here for further improving the whole mechanism? It goes into simpler
WebExtension stuff. There are also maintenance tasks like #50
<#50> and
I've found another extension that did the same as we did (unfortunately
only now), that may have done things better or can at least be used for
inspiration: raikasdev/mastodon4-redirect#6
<raikasdev/mastodon4-redirect#6>
—
Reply to this email directly, view it on GitHub
<#86 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABRYR4PA4A5RIWXY7GRCJVDWNCK7PANCNFSM6AAAAAASIKDUZA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hey! I have also thought about an another idea: What if instead of redirecting or something, the follow/interact button clicks are listened to, preventing default listeners and then using OAuth to do the action? - Roni |
While that may be possible, I see a technical risk here. The TL;DR is that you cannot see who you are interacting with, because a website may fake/show anything, where you can click on. I elaborated on this on Mastodon already, because a different extension works like that, but have not yet proven it by testing it out. |
Background
In #84 @hueyy implemented support for Mastodon v4.
I also plan to enable "skip popup" by default now, since the popup is not a known concept for Mastodon v4 users now.
However, the problem then persists that if you enable "popup closing" (see #44) this the popup quickly opens and closes, which is just not needed, really, as we just do that to re-implement/keep the legacy way of how it worked. See #83 (comment).
Proposed solution
The content script needs to communicate the username or other data back to the background script where to navigate, which then triggers the tab navigation…Actually, easier: Instead of opening
target="_blank"
we can just switch to the default target/target"_self_"
, i.e. the same window in the content script triggers. The redirect should work as usual. This still needs to pass that setting to the content script from the background script, but that is okay/possible reasonably.Also UI things:
Alternatives
Leave it as it is. I consider this an iteration over the previous features, as it is "just" a minor inconvenience and opens a new popup. And would be quite some implementation effort, as it changes the add-on again fundamentally.
Additional context
The text was updated successfully, but these errors were encountered: