2019-02-09 13:36:32 +11:00
|
|
|
#!/usr/bin/env lua
|
|
|
|
local tA = {...}
|
|
|
|
local default = "firefox"
|
|
|
|
local programs = {
|
|
|
|
["youtube.com"]="mpv",
|
|
|
|
["www.youtube.com"]="mpv"}
|
|
|
|
|
|
|
|
for k,v in pairs(tA) do
|
|
|
|
local domain = v:match("https?://(.-)/")
|
|
|
|
local program = programs[domain] or default
|
2020-07-14 04:28:41 +10:00
|
|
|
os.execute(string.format("%s '%s'",program, v))
|
2019-02-09 13:36:32 +11:00
|
|
|
end
|