finicky icon indicating copy to clipboard operation
finicky copied to clipboard

How to detect the URL data from a Brave Browser PWA?

Open usizu opened this issue 1 year ago • 3 comments

Any ideas, suggestions or other feedback I've installed a Progressive Web App through Brave Browser to my desktop (email client Proton Mail) and finicky doesn't detect it — even when adding the generalised URL logging from this page: https://github.com/johnste/finicky/wiki/Troubleshooting-&-Tips#i-want-to-see-all-incoming-parameters-to-the-url-handling-functions

The logging works for the same PWA installed from Safari, but not the one from Brave. Nothing shows up at all in the finicky console.

Is there any way to detect these URLs? Otherwise they always default to opening in Brave Browser, (they are ignored by finicky entirely, which has the default set to Safari).

usizu avatar Feb 03 '24 17:02 usizu

(Given that it works with the PWA generated by Safari but not the one generated by Brave, my reason for using Brave's instead is just that when opened simultaneously, Brave's PWA launches faster)

usizu avatar Feb 03 '24 17:02 usizu

Getting the bundleId with osascript -e 'id of app "ProtonMail"' (which is com.brave.Browser.app.jnpecgipniidlgicjocehkhajgdnjekh) and then doing

{
  // Open any link clicked in Proton Mail PWA
  match: ({ opener }) =>
    opener.bundleId === "com.brave.Browser.app.jnpecgipniidlgicjocehkhajgdnjekh",
  browser: "Safari"
},

also doesn't work

usizu avatar Feb 03 '24 18:02 usizu

I found the solution https://github.com/johnste/finicky/issues/153#issuecomment-886952938 This is what I do for the Google Meet PWA using Brave too.

      {
            match: finicky.matchHostnames(["meet.google.com"]),
            browser: ({ urlString }) => ({
                name: "com.brave.Browser",
                profile: "Default",
                args: [
                    '--app-id=kjgfgldnnfoeklkmfkjfagphfepbbdan', // the app ID for the Google Meet application shortcut.
                    `--app-launch-url-for-shortcuts-menu-item=${urlString}`, // notice it is NOT passing 'url' as an array entry, but 'urlString' as string. Chrome Application Shortcuts need a normal string not url objects.

                ],
            }),
        },

ascandroli avatar Sep 06 '24 15:09 ascandroli