remote.lua

来自「一个很有名的浏览器」· LUA 代码 · 共 49 行

LUA
49
字号
-- ELinks-side part of elinks-remote-- $Id: remote.lua,v 1.2 2003/10/02 12:16:04 kuser Exp $-- See script elinks-remote for explanation what's this about.------------------------------------------------------------------------  User options------------------------------------------------------------------------ File to look in for external url to jump to   external_url_file = elinks_home.."/external.url"------------------------------------------------------------------------  Implementation----------------------------------------------------------------------function external_url ()   fh = openfile (external_url_file, "r")   aline = current_url ()   if fh then      aline = read (fh, "*l")      closefile (fh)   else      print ("Couldn't open outfile")   end   return alineend   bind_key ("main", "x",             function () return "goto_url", external_url () end)function set_external_url ()   fh = openfile (external_url_file, "w")   aline = current_link ()   if fh then      write (fh, aline.."\n")      closefile (fh)   else      print ("Couldn't open outfile")   endend    bind_key ("main", "X",              function () set_external_url () end)-- vim: shiftwidth=4 softtabstop=4

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?