aboutsummaryrefslogtreecommitdiff
path: root/users/ryan/modules/simple-bar/simple-bar-source/lib/scripts/firefox-dev-audio.applescript
diff options
context:
space:
mode:
authorRyan Schanzenbacher <ryan@rschanz.org>2026-07-09 22:15:53 -0400
committerRyan Schanzenbacher <ryan@rschanz.org>2026-07-09 22:15:53 -0400
commitd06784958d73159b5e4abafe5114804662114ed7 (patch)
treed8464262c1aa1f10553a5b11a9fda3e505e71f7f /users/ryan/modules/simple-bar/simple-bar-source/lib/scripts/firefox-dev-audio.applescript
parent1a71e94eb8ca1585201263cf654611ef6849d359 (diff)
move ubersicht modules in tree
Diffstat (limited to 'users/ryan/modules/simple-bar/simple-bar-source/lib/scripts/firefox-dev-audio.applescript')
-rwxr-xr-xusers/ryan/modules/simple-bar/simple-bar-source/lib/scripts/firefox-dev-audio.applescript24
1 files changed, 24 insertions, 0 deletions
diff --git a/users/ryan/modules/simple-bar/simple-bar-source/lib/scripts/firefox-dev-audio.applescript b/users/ryan/modules/simple-bar/simple-bar-source/lib/scripts/firefox-dev-audio.applescript
new file mode 100755
index 0000000..6618fec
--- /dev/null
+++ b/users/ryan/modules/simple-bar/simple-bar-source/lib/scripts/firefox-dev-audio.applescript
@@ -0,0 +1,24 @@
1set browser to ""
2set title_string to ""
3set active_tab to 0
4
5to replace_chars(this_text, search_string, replacement_string)
6 set AppleScript's text item delimiters to the search_string
7 set the item_list to every text item of this_text
8 set AppleScript's text item delimiters to the replacement_string
9 set this_text to the item_list as string
10 set AppleScript's text item delimiters to ""
11 return this_text
12end replace_chars
13
14tell application "Firefox Developer Edition"
15 set the_title to (name of windows whose name contains "- YouTube") as text
16
17 if "- YouTube" is in the_title then
18 if active_tab is 0 then set title_string to " " & text 1 thru -11 of the_title
19 set browser to "firefox"
20 set active_tab to 1
21 end if
22end tell
23
24return "{ \"browser\": \"" & browser & "\", \"title\": \"" & replace_chars(title_string, "\"", "Ò") & "\" }"