touch bar web player cover image

touch-bar
#1

if application "Google Chrome" is running then
tell application "Google Chrome"
repeat with t in tabs of windows
tell t
if URL starts with "http://www.mnet.com/player/aod/" then
set s to title of t as text
set AppleScript's text item delimiters to " | 엠"
set s to text item 1 of s
set cover to execute javascript "document.getElementById('player').getElementsByTagName('img')[0].src"
return "{"text":"" & s & "","icon_data": "base64_icon_data", "icon_path":"" & cover & ""}"
end if
end tell
end repeat
end tell
end if

--run script--
"{"text":"주인공 / 선미","icon_data": "base64_icon_data", "icon_path":"http://cmsimg.mnet.com/clipimage/album/480/002/778/2778228.jpg"}"

I want to display the image on the touch bar.

0 Likes