trigger a gesture only when a certain website is active

Is it already possible to trigger a gesture just when a certain website is active?


For example, for these Trackpad shortcuts, I want them to only be active if youtube is active.

using conditional activation groups or advanced trigger conditions you can match the active window title. For some websites that title is enough to recognize them. There are also browser extensions that put the full address bar in the window title.

My Main Browser is Arc, I'm not sure how to make it work, I'll try.

Basically check whether the window title in the CAG conditions changes for Arc:

1 Like

Thanks!

I didn't find the exact condition param you mentioned,

but I found this one and tried it, it works when the tab is focused and contains "youtube" (Case Sensitive) in Arc.
But I have a 2 screen setup and even when I focus on another app on the other screen and Arc isn't focused, it shows as active:

Here BTT was focused, but still shows green.

I have been able to make it work with this config: :white_check_mark:

Also, I often change the tab titles in Arc, I was looking for a solution that recognizes the active website without having it in the tab title.

unfortunately if you can't rely on the window title you'd need a browser extension that tells BTT which site is active ;-(

BTT excludes itself from the active window title observation, which might explain why it didn't change in that case

Is there a Chrome extension I could use? (Without involving a change in the tab title)

I still can't find the "Window title" condition you showed in the screenshot, Is it hidden on my side? (I'm in Trackpad triggers)

The new alpha 4.189 now adds a new "Active Website URL" condition to conditional activation groups and to advanced trigger conditions. It works with Safari and Chrome (and maybe some Chrome based browsers).

2 Likes

Amazing !!!

Just tried it, in a simple CAG, with an HUD as an action to test it.
It didn't work, is there a setting I should Change ?


Also, I have BTT Community as an active URL, but it doesn't show in the conditions values.

Doesn't work on Safari either.

BetterTouchTool might need to be activated for the browsers in System Settings => Privacy & Security => Automation, can you check that?,

Unfortunately, it does not work for me either.

Did macOS not ask about allowing BTT to control Safari / Chrome / .. ?

Could you try what happens if you try to execute this Apple Script with the "Run Apple Script" action in BTT?

tell application "Safari"
    set theURL to URL of current tab of window 1
end tell

Asked for some permissions (Didn't take a screenshot or actually read them), I granted them.

But the URL still didn't show here
image

Privacy settings now:

I think I can reproduce the issue on my other machine :slight_smile: will fix tomorrow!

Looking Forward to it !!
Thanks.

I think it should now work with 4.191

Supported Browsers right now:
Safari, Safari Technology Preview, Chrome, Chrome Canary, Edge and Brave

Yes, it works with Safari!
How can I make it work with Arc?

1 Like

I'll add more browsers upon request. Do you know whether arc is based on chrome?

It's Chromuim based yes.