[w3m-dev 04008] Re: convert javascript:fooBar(URL) to URL

NAKAJIMA Mikio <[email protected]>
Newsgroups gmane.comp.web.w3m.devel
Message-ID <m3brs9psfr.wl%[email protected]>
At Mon, 17 Feb 2003 01:09:54 +0900,
Fumitoshi UKAI <[email protected]> wrote:
 
> これでいいんなら、
> 
> #!/usr/bin/perl
> # javascriptURL.cgi?javascript:....('url')
> 
> $query = $ENV{'QUERY_STRING'};
> 
> if ($query =~ /^javascript:.*\(["']([^'"]+)["']\)/) {
>   print "w3m-control: GOTO $1\r\n";
> }
> exit 0;
> # url_unquote()とかがいるかな
> 
> みたいなのを file:///$LIB/javascriptURL.cgi みたいに置いておいて
> urimethodmap に
> 
> javascript:	file:///$LIB/javascriptURL.cgi?%s
> 
> とかでいいのでは?

  ずい分以前の話ですが、ほとんど鵜飼さんのと同じで、投稿価値ないかもし
れませんが、ruby で書いたものが手元にあるので、一応投げときます (何故
ruby ?って、perl 書けないから)。

  <A HREF="javascript:popWindowAcc1('../Acc/PEGA-WL100/index.html')">PEGA-WL100</A></TD>

のようなリンクでも ../Acc/PEGA-WL100/index.html だけ拾って表示しようと
します。

坂本さんに教えてもらった GOTO_RELATIVE が何故か動かなくて W3M_URL を参
照しています。TAB_GOTO(_RELATIVE)* を使って Javascript で Window が開
かれるのと同じっぽくしようかと思ったのですが、DELETE_PREVBUF しても
TAB を開く前のバッファには効かないのでやめました。

中島幹夫 <[email protected]>
	 <[email protected]>
home: http://www.asahi-net.or.jp/~gy2m-nkjm
diary: http://slashdot.jp/journal.pl?op=display&uid=5767
javascriptURL.cgi (application/octet-stream, 617 B) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.