Closed duhrer closed 8 months ago
As mentioned in #90, I still need to figure out a few functions that don't work after the initial conversion. Submitting the work in progress in case anyone has time to try it out and comment.
I have everything working except navigating between browser windows. I will continue working on that.
The window switching now works. I'll clean up the build failures and update the message listener docs, and then I think this will be ready for review.
This is ready for review.
@duhrer did a quick look at the code, seems good; other than the failed CI task. I tried out the extension. Is it expected that it doesn't work on the Google home page?
@jobara, the default built-in starting page in Chrome doesn't get the required scripts injected, which has always been a problem. We have "start page" logic that's meant to circumvent this by opening the Google URL instead, I'll have to confirm how/whether that's working.
Long term, my idea is to have "new window" and "new tab" open a dialog where you can choose where to go, so that you can't end up on a page you can't navigate away from or control.
The CI failure is a linting error, which I just fixed.
So, previously we use a fluid component for the background script, and it used invoker definitions to change a lot of function signatures. After more closely reviewing, I discovered that the signature of the wrappers for "new window" and "new tab" was off, resulting in the URL we use by default not getting passed to the code that creates the new tab or window.
With this fixed, creating a new window (right thumb stick press by default) or creating a new tab (start button press by default) both work as expected, and no longer dump the user in a window/tab they can't control.
Just to confirm, this should be ready for further review.
@duhrer I'm still getting some funny behaviour with the browser forward/back where it will kick me back to the default new tab in chrome. I'm not exactly sure what happened but I went back and forward fine at first, but then it threw me to the new tab page that I can't interact with. What's worse is that even if I type in a URL it will launch that page but after loading it will immediately kick me back to the new tab page even without interacting with the gamepad.
Thanks for catching that, @jobara. I installed the previous release to confirm, and the same thing happens, namely:
I'll write it up as a new ticket and add it to the list of work that needs doing.
Self-merging this and moving on to fixing #98.
See #90 for details.