summaryrefslogtreecommitdiffstats
path: root/www/seamonkey/files/mozilla.sh
diff options
context:
space:
mode:
Diffstat (limited to 'www/seamonkey/files/mozilla.sh')
-rw-r--r--www/seamonkey/files/mozilla.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/www/seamonkey/files/mozilla.sh b/www/seamonkey/files/mozilla.sh
new file mode 100644
index 000000000..3eae0f5cb
--- /dev/null
+++ b/www/seamonkey/files/mozilla.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+MOZILLA_DIR="%%PREFIX%%/lib/%%MOZILLA%%"
+MOZILLA_EXEC="mozilla"
+LOCATION='new-tab'
+
+cd $MOZILLA_DIR || exit 1
+
+case $1 in
+ -browser)
+ REMOTE_COMMAND="xfeDoCommand (openBrowser)"
+ ;;
+ -mail)
+ REMOTE_COMMAND="xfeDoCommand (openInbox)"
+ ;;
+ -compose)
+ REMOTE_COMMAND="xfeDoCommand (composeMessage)"
+ ;;
+ -*)
+ exec ./$MOZILLA_EXEC "$@"
+ ;;
+ *)
+ REMOTE_COMMAND="openURL($@,$LOCATION)"
+ ;;
+esac
+
+# process found
+./$MOZILLA_EXEC -remote "ping()" &&
+./$MOZILLA_EXEC -remote "$REMOTE_COMMAND" && exit 0
+
+# no existing process
+exec ./$MOZILLA_EXEC "$@"
+