Warning: this is an htmlized version!
The original is across this link,
and the conversion rules are here.
#!/usr/bin/env lua51
-- A handler for the "gvpage://" protocol for firefox.
-- See: (find-es "javascript" "handling-other-protocols")
-- (find-dotfirefoxfile "user.js")
-- (find-pspage "~/o.ps")
-- (find-sh0 "~/bin/gvpage.sh gvpage:///home/edrx/o.ps")

-- user_pref("network.protocol-handler.app.gvpage", "/home/edrx/bin/gvpage.sh");
-- user_pref("network.protocol-handler.expose.gvpage", true);
-- user_pref("network.protocol-handler.warn-external.gvpage", false);

print("Hello")

url = arg[1]
proto, fname = url:match("^([a-z]+)://(.*)$")
fname2, page = fname:match("^(.-)#([0-9]+)$")
if page then
  os.execute("gv --page="..page.." "..fname2)
else
  os.execute("gv "..fname)
end

-- find-pspage
-- (ee-pspage "foo" 12)

-- Local Variables:
-- coding: raw-text-unix
-- mode:   lua
-- modes:  (fundamental-mode emacs-lisp-mode lua-mode c-mode)
-- End: