Saving Cookies
Describe the feature you'd like I'd love the ability to save cookies and restore them, unless I am missing somthing quite obvious.
Reason for this feature request I want to stay logged in once I log in...
Cookies should work as usual for remote URLs (e.g. http://www.google.com) but for the app things are a bit different.
SpiderEye always uses a different domain for each webview for security reasons. Since cookies are stored for a specific domain, they are essentially lost once you open a new window. If you need to persists any data (not just cookies) you should do it on the .NET side of things and not in the webview.
Would that work for you? If not, please give me a specific example so I can figure out a solution.
Okay so the situation I'm in is that I am trying to login and stay logged into https://www.twitch.tv/popout/pfckrutonium/chat?popout= - Logging in works (yay!) but as soon as the application is closed and re-opened, the login is forgotten and I have to log in again.
Based on what you said, if I'm understanding this correctly then, because it's a remote domain, it should work fine? Because as far as I can tell it doesn't. This all being said, how would I store the cookies on the .NET side of things? Also of interest, can I inject Javascript?
yes that should work, I'll have to investigate why it doesn't. Can you tell me please which OS (and webview if on windows) you are using?
As for storing things, you'd use a bridge object and communicate with it via JavaScript. I just recently wrote about it here: https://github.com/JBildstein/SpiderEye/issues/12#issuecomment-609027373
Injecting JavaScript in arbitrary sites is not possible (well, it's possible, but there is currently no public API for it). If you control the site however, you can do whatever you want with the Window.Bridge.InvokeAsync method. You just have to have an event set up in JavaScript that calls eval or something.
I'm running it on Arch Linux, and I have zero to negative one % chance of convincing Amazon to add Javascript to my chat hah.