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

Captcha popup blocks the ability to open tabs on Chrome. #10

Open
pip182 opened this issue Mar 3, 2017 · 5 comments
Open

Captcha popup blocks the ability to open tabs on Chrome. #10

pip182 opened this issue Mar 3, 2017 · 5 comments
Labels

Comments

@pip182
Copy link

pip182 commented Mar 3, 2017

I just want to say this script is awesome! I've been getting the video URL manually then downloading with aria2c for a while now, but this script makes it so much easier!

But the problem I have found is that when using Chrome the popup containing the captcha URL blocks the ability to open a new tab. I am also unable to even open a new Chrome window, I can open it but it will not accept any input. This make me unable to do the captcha to allow the script advance to the next video. It does work fine in Firefox though.

This is on a Linux machine so it's possible that it works fine on windows, but I have not tested that theory. I know that this is just a quirk with the way Chrome handles the java-script alert box, and isn't anything wrong with your code.

I do have a few ideas on how this issue could be fixed:

  1. We could use jquery-confirm to display the URL (it works great and is really easy to use). This should not block the ability to open a new tab.

  2. We could send the URL straight to the clipboard with clipboardjs and have the user open a new tab then paste the URL manually. We would still need to notify the user that they need to do the captcha and wait until they are finished.

  3. We could automatically open a new tab and have it navigate to the captcha URL. (I like this one most of all). I think we could use "readline()" and have the user input something in the console window to signal that the captcha has been completed, but this is not the most user friendly solution.

Anyway, what do you think? Or am I the only one with this problem?

I could probably fix this myself and do a pull request but I'm not sure when I would be able to get around to it.

@aviaryan
Copy link
Owner

aviaryan commented Mar 3, 2017

Hi @pip182
Thanks for your input. I don't use Chrome these days so didn't stumble upon this issue myself. I think # 1 is the best solution for us as it provides best user experience. Also, I just tested the script on Chrome and it indeed has this issue. I think we should fix it soon. So do you plan to send a PR?

@pip182
Copy link
Author

pip182 commented Mar 3, 2017

I'll see if I can make the time this weekend to fix this, but I may not be able to get to it. If you don't want to wait for me then by all means go ahead and fix it yourself.

I think maybe a mix of 1 and 3 would be good, we could show a dialog that explains that the user has to do a captcha, while at the same time opening a new tab with the correct url for them.

Using jquery-confirm we might have to restructure the code a bit (it's not just a swap the dialog box out thing). Right now when showing the prompt dialog it prevents the script from advancing until the user has closed the dialog, with jquery-confirm the script will continue while the dialog is open. This SO thread explains what I'm talking about better than I can.

@aviaryan
Copy link
Owner

aviaryan commented Mar 3, 2017

One thing to note here is that website like KissAsian blocks external scripts from running. (eg $.getScript... doesn't work there)
So it will be tough to get a custom JavaScript library (like jquery-confirm) to run there. We can copy its code but that's the last thing we want to do.
Therefore I was thinking of using console for displaying captcha prompts. We can define a custom function like yes() and ask user to enter that once captcha is solved. But this is not very user friendly. What do you think?

@pip182
Copy link
Author

pip182 commented Mar 3, 2017

We probably don't really need to use an external script, we could just create a simple function that modifies the DOM to display a fixed position

that contains the URL and instructions.

I am kind of leaning toward the console being the easiest way to solve this problem as well. I agree with it not being user friendly though, but if the user has to enter the $.getScript function in the console anyway we might as well use it for input too. Maybe we could detect if the browser is Chrome and only use the console if it's a Chrome based browser. Though there are quite a few browsers that are Chrome based nowadays, Opera, Vivaldi, Yandex... etc. so it might make more sense to just use the console on every browser.

@aviaryan aviaryan added the bug label Mar 5, 2017
@boardfish
Copy link

Just experienced this problem myself. It's a little frustrating that Chrome demands a workaround like this. Nobody's fault, though.

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

No branches or pull requests

3 participants