Possibility to make BTT as a default browser

i am trying to match a certain url schema. e.g. only open the url from chrome in edge IF the url is ".jira.company.com" ELSE open it in chrome.

I think you currently can't use the open url action like that, even when returning an empty string it would try to open something and fail.

You could use the "run real javascript" action though:

(async ()=> {
    const clipboardContent = await callBTT('get_clipboard_content', {});
    if(clipboardContent.includes('.jira.company.com')) {
        await runShellScript({script: `/usr/bin/open -b com.microsoft.edgemac '${clipboardContent}'`});

    } else {
        await runShellScript({ script: `/usr/bin/open -b com.google.chrome '${clipboardContent}'`
        });
    }
  returnToBTT("done");
})();
1 Like

thanks that does the trick.

regarding the behaviour of the open url action: it only threw an error at me when it was empty, you are right. but it did do nothing when handing over text but not an url. anyway, fine for me now. thanks a lot