Created
December 12, 2016 01:56
-
-
Save Ruin0x11/62acf02e1d28e8ad5d4f8df389510d65 to your computer and use it in GitHub Desktop.
Lookup current subtitle text in Jisho.org
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function lookup_jisho() | |
local text = mp.get_property("sub-text") | |
if text == "" then | |
return | |
end | |
mp.set_property("pause", "yes") | |
os.execute("open \"http://jisho.org/search/" .. text .. "\"") | |
end | |
mp.add_key_binding("Ctrl+j", "lookup_jisho", lookup_jisho) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment