From d06784958d73159b5e4abafe5114804662114ed7 Mon Sep 17 00:00:00 2001 From: Ryan Schanzenbacher Date: Thu, 9 Jul 2026 22:15:53 -0400 Subject: move ubersicht modules in tree --- .../lib/scripts/firefox-dev-audio.applescript | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 users/ryan/modules/simple-bar/simple-bar-source/lib/scripts/firefox-dev-audio.applescript (limited to 'users/ryan/modules/simple-bar/simple-bar-source/lib/scripts/firefox-dev-audio.applescript') 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 @@ +set browser to "" +set title_string to "" +set active_tab to 0 + +to replace_chars(this_text, search_string, replacement_string) + set AppleScript's text item delimiters to the search_string + set the item_list to every text item of this_text + set AppleScript's text item delimiters to the replacement_string + set this_text to the item_list as string + set AppleScript's text item delimiters to "" + return this_text +end replace_chars + +tell application "Firefox Developer Edition" + set the_title to (name of windows whose name contains "- YouTube") as text + + if "- YouTube" is in the_title then + if active_tab is 0 then set title_string to " " & text 1 thru -11 of the_title + set browser to "firefox" + set active_tab to 1 + end if +end tell + +return "{ \"browser\": \"" & browser & "\", \"title\": \"" & replace_chars(title_string, "\"", "Ò") & "\" }" -- cgit v1.3