plan9port/bin/web

51 lines
676 B
Text
Raw Normal View History

2004-03-02 23:11:58 +00:00
#!/bin/sh
plumb1()
{
2005-01-04 21:15:55 +00:00
case x-$BROWSER in
2004-03-02 23:11:58 +00:00
# Other browsers here
# ...
*opera*)
2005-01-04 21:15:55 +00:00
$BROWSER -remote 'openURL('$i',new-page)'
2004-03-02 23:11:58 +00:00
;;
*firebird*)
2005-01-04 21:15:55 +00:00
$BROWSER -remote 'openURL('$i',new-window)'
2004-03-25 23:03:22 +00:00
;;
2004-03-21 04:32:36 +00:00
*firefox*)
2005-01-04 21:15:55 +00:00
$BROWSER -remote 'openURL('$i',new-tab)'
;;
x-)
# run firefox as default!
firefox -remote 'openURL('$i',new-tab)'
2004-03-02 23:11:58 +00:00
;;
2004-07-03 17:46:40 +00:00
*mozilla*)
2005-01-04 21:15:55 +00:00
$BROWSER -remote 'openURL('$i',new-tab)'
;;
x-*)
$BROWSER -remote 'openURL('$i',new-tab)'
2004-07-03 17:46:40 +00:00
;;
2004-03-02 23:11:58 +00:00
esac
}
if [ $# = 0 ]
then
plumb1 about:blank
else
for i
do
if [ -f "$i" ]
then
2004-06-09 14:05:29 +00:00
p=`pwd`
i=`cleanname -d $p $i`
i=file://$i
2004-03-02 23:11:58 +00:00
fi
plumb1 $i
done
fi
case $BROWSER in
*opera*)
$BROWSER -remote 'raise()'
esac