Skip to content

tab removed and passwordEntered action in redirectDownload #102

@msuess

Description

@msuess

This is a bit of a mess.

The remove here is needed for linkedin, because clicking on the download button opens the download in a new tab.

The passwordEntered gets triggered for facebook, because the download happens in the same tab where the password was entered. This was added recently to fix the button blinking issue, as the onunload handler does not seem to get triggered (which is needed to call the iframe driver's next() function which would trigger passwordEntered. Originally, I replaced remove with passwordEntered which broke linkedin.

To properly fix this, we would need the following:

  • attach fb-fetcher's next() callback to something other than onunload
    • -> we can remove the passwordEntered here
  • instead of always calling remove, find a way to only trigger it when the download was opened in a new tab. We could hardcode this into the fetcher config or perhaps pass a parameter {closeTab: true} to ctx.redirectDownload(...)
  • the try ... catch above needs to stay for making the download-in-tab special case work together with fb's download-in-password-tab unless we want to do some (major?) refactoring here.

Originally posted by @msuess in #98

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions