Closed kavinvalli closed 3 years ago
try
do shell script "osascript -e 'id of application \"Brave Browser\"'"
if application "Brave Browser" is running then
tell application "Brave Browser"
set window_list to every window
repeat with the_window in window_list
set tab_list to every tab in the_window
repeat with the_tab in tab_list
set the_url to the URL of the_tab
set the_title to the title of the_tab
if "open.spotify.com" is in the_url then
if active_tab is 0 then set title_string to " " & text 1 thru -11 of the_title
set browser to "brave"
set active_tab to 1
if "Spotify" is in the_title then set title_string to ""
end if
end repeat
end repeat
end tell
end if
end try
I tried this which works. I added spotify in here because Brave removes spotify ads which shows up as "Advertisement..." in the spotify widget
Great idea! I just implemented it.
Brave is now supported with YouTube & Spotify for browser and Spotify for browser was added to Chrome.
Thank you for the idea. :)
Can support for Brave Browser please be added. Brave is very similar to Chrome, so I think the scripts for both should be very similar