Replies: 7 comments
-
so true! doubt it's possible, though... some sites demand using mouse and ignore keys, some use a delay and you have to know what to wait for... it's almost like a plugin and its own project are needed to keep track of sites and their popups... i don't know if singlefile has a plugin architecture in place currently to develop something like that independently from core singlefile itself... |
Beta Was this translation helpful? Give feedback.
-
I'm wondering if anyone has any luck writing a script to get rid of the popup for just Stackoverflow? It's such a heavily viewed and referenced site. |
Beta Was this translation helpful? Give feedback.
-
Sorry for the late answer, I guess running this userscript should do the job: onload = () => {
document.querySelector(".js-accept-cookies").click();
}; |
Beta Was this translation helpful? Give feedback.
-
I tried to close popups and accept cookie banners with SingleFile CLI, but failed. How should we use user scripts? I tried with below command and sample codes, but it does not work.
|
Beta Was this translation helpful? Give feedback.
-
The script I provided is specific to StackOverflow. For google.com, you could run this script instead: onload = () => {
document.evaluate("//*[. = 'I agree']", document.body).iterateNext().click();
}; |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot for your support and maintaining SingleFile. I was using Docker, and could not managed to run user scripts. I made a manual installation as described here and it works great. I can provide another example to close OneTrust cookie banner:
My command: |
Beta Was this translation helpful? Give feedback.
-
I'm moving this issue in the discussion tab because I think and hope it's a better place for it. |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
When using the CLI, html capture will show cookies popup, and this blocks part of the Stackoverflow page.
Describe the solution you'd like
Can you please share a script that will close the cookies popup for Stackoverflow?
You've helped me with a similar problem with Reddit threads not unfolding, and I thought I could easily write a script to close the cookies popup, but I'm not having luck. If there's a general script that can close all cookies popup, I think that would add a lot of value to the CLI for everyone, because that would make the output look more like what we get when using web browser extension. Thank you for considering your help.
Beta Was this translation helpful? Give feedback.
All reactions