|
Revision 4596, 1.4 kB
(checked in by erijo, 2 years ago)
|
|
Add viewurl-seamonkey.sh and viewurl-firefox.sh as suggest by Dmitry A. Koptev in #1390.
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
|
| Line | |
|---|
| 1 | #!/bin/sh |
|---|
| 2 | # |
|---|
| 3 | # by Nicos Gollan <gtdev@spearhead.de>, 2003-01-31 |
|---|
| 4 | # |
|---|
| 5 | # Used to open URLs in Mozilla, using Mozillas 'remote' function |
|---|
| 6 | # (see http://www.mozilla.org/unix/remote.html) to avoid opening |
|---|
| 7 | # new browser windows all over the place. Default is to open the |
|---|
| 8 | # requested site in a new tab. Configuration can be done via |
|---|
| 9 | # environment variables. |
|---|
| 10 | # |
|---|
| 11 | # Recognized environment variables: |
|---|
| 12 | # - VURL_MOZILLA |
|---|
| 13 | # Your mozilla binary. Defaults to 'mozilla' |
|---|
| 14 | # - VURL_HOME |
|---|
| 15 | # Your homepage. Defaults to 'www.licq.org'. This page is |
|---|
| 16 | # opened if this script is called without parameters |
|---|
| 17 | # - VURL_OPENMODE |
|---|
| 18 | # Method of opening the URL. |
|---|
| 19 | # "new-tab" - opens URL in a new tab (default) |
|---|
| 20 | # "new-window" - opens URL in a new window |
|---|
| 21 | # "current" - opens URL in the current window |
|---|
| 22 | # |
|---|
| 23 | |
|---|
| 24 | if [ -z "${VURL_MOZILLA}" ]; then |
|---|
| 25 | MOZILLA=firefox |
|---|
| 26 | else |
|---|
| 27 | MOZILLA=${VURL_MOZILLA} |
|---|
| 28 | fi |
|---|
| 29 | |
|---|
| 30 | if [ -z "${VURL_HOME}" ]; then |
|---|
| 31 | URLHOME='http://www.licq.org' |
|---|
| 32 | else |
|---|
| 33 | URLHOME="${VURL_HOME}" |
|---|
| 34 | fi |
|---|
| 35 | |
|---|
| 36 | if [ -z "${VURL_OPENMODE}" ]; then |
|---|
| 37 | OPENMODE=new-tab |
|---|
| 38 | else |
|---|
| 39 | OPENMODE="${VURL_OPENMODE}" |
|---|
| 40 | fi |
|---|
| 41 | |
|---|
| 42 | if [ "$1" = "" ] ; then |
|---|
| 43 | URL=$URLHOME |
|---|
| 44 | else |
|---|
| 45 | URL=$1 |
|---|
| 46 | fi |
|---|
| 47 | |
|---|
| 48 | if [ "${OPENMODE}" = "current" ]; then |
|---|
| 49 | OPENSTRING="${URL}" |
|---|
| 50 | else |
|---|
| 51 | OPENSTRING="${URL},${OPENMODE}" |
|---|
| 52 | fi |
|---|
| 53 | |
|---|
| 54 | # If mozilla is already running, open the URL as new tab, |
|---|
| 55 | # otherwise launch a fresh copy of mozilla. |
|---|
| 56 | ((${MOZILLA} -remote openurl\("${OPENSTRING}"\) ) || (${MOZILLA} "${URL}") & ) > /dev/null 2>&1 |
|---|