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

Automatic link handling does not work when a new tab is opened for the link #69

Closed
chrigi opened this issue Jan 22, 2018 · 4 comments
Closed

Comments

@chrigi
Copy link

chrigi commented Jan 22, 2018

Versions

Extension version: 0.4.1
Browser and version: FF 57.0.4
DSM version: DSM 6.1.4-15217 Update 5
Download Station version: 3.8.7-3490

Steps to Reproduce the Issue

  1. Click on a Magnet link
  2. It should open the link directly with the extension
  3. It opens a new tab with the magnet link, never triggering the extension

Issue Descritption

As discussed in #33 and implemented in 99a8663 the extension can automatically handle magnet links by simply clicking on them. This generally works fine but there are instances where it does not work. It seems whenever a new tab is opened automatically for the link, the handler will not be triggered.

One example: I have an RSS Feed with magnet links subscribed in NewsBlur, when I click the link it opens the link in a new tab but does not download it with the dl manager. The links are of the form <a href="magnet:...">Magnet</a>.

This also happens on some pages but I don't have an additional example atm.

@seansfkelley
Copy link
Owner

Thanks for taking the time to put together this bug report! Is that the complete form of the <a> tags? I would expect there to be probably something along the lines of <a href="..." target="_blank"> to exhibit the described behavior. The code that handles intercepting clicks on appropriate <a> tags is a best-effort since Firefox doesn't support proper protocol handling for extensions, and may need some tuning for this scenario.

@seansfkelley
Copy link
Owner

@chrigi are you still seeing this issue?

@chrigi
Copy link
Author

chrigi commented Feb 16, 2018

Sorry for the delay. I did some more tests. The link does not contain a target (at least on NewsBlur titles) but I crafted a link I could click with a target but sadly it still did not trigger. I'm starting to assume that NewsBlur must be doing something special to break it. On other sites I can't reproduce the issue consistently.

@seansfkelley
Copy link
Owner

I poked around NewsBlur to see what kind of thing it's doing and I think you're right that it's doing something special. The handlers attached to titles and stories usually call stopPropagation (which prevents the Synology Download Manager handler from ever running) and preventDefault (which would prevent the handler even if I could attach it "the right way"). In substituting some links there with magnet links I also saw behavior similar to what you describe: new tab, no task added.

I'm going to close this out with "can't fix, no workaround" because we're ultimately at the mercy of the site to allow us to know when the user has clicked a link.

If you can reproduce the issue consistently on another site, feel free to reopen and I can take another look (though I expect the outcome would be similar).

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

No branches or pull requests

2 participants