2 ms·
sure, for example this pauses every youtube video in every chrome tab: tell application "Google Chrome" repeat with theWindow in every window repeat with the
by cpleppert 4y ago
sure, for example this pauses every youtube video in every chrome tab:
tell application "Google Chrome"
repeat with theWindow in every window
repeat with theTab in (every tab of theWindow)
if (URL of theTab) contains "youtube.com" then
execute theTab javascript "document.querySelectorAll('video, audio').forEach(e => e.pause())"
end if
end repeat
end repeat
end tell
There are lots of examples just by googling. The script editor has a dictionary for every application you can natively script.