2 # --- SDE-COPYRIGHT-NOTE-BEGIN ---
3 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
5 # Filename: target/mnemosyne/pkg_conf/firefox.conf
6 # Copyright (C) 2002 - 2006 Alejandro Mery
8 # More information can be found in the files COPYING and README.
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; version 2 of the License. A copy of the
13 # GNU General Public License can be found in the file COPYING.
14 # --- SDE-COPYRIGHT-NOTE-END ---
16 hook_add postmake
5 'mnemosyne_firefox_openurl'
17 hook_add postmake
6 'mnemosyne_firefox_prefs'
19 mnemosyne_firefox_openurl
() {
20 cat <<-EOT > $bindir/$pkg-openurl.sh
23 export MOZILLA_FIVE_HOME="$libdir/$pkg-$ver"
24 export LD_LIBRARY_PATH=\$MOZILLA_FIVE_HOME:\$LD_LIBRARY_PATH
28 [ -n "\$url" ] || url="about:blank"
29 [ -n "\$what" ] || what="new-tab"
31 MOZXREMOTE="\$MOZILLA_FIVE_HOME/mozilla-xremote-client -a $pkg"
32 if \$MOZXREMOTE 'ping()'; then
33 exec \$MOZXREMOTE "openURL(\$url,\$what)"
35 exec $bindir/$pkg "\$url" &
38 chmod +x
$bindir/$pkg-openurl.sh
41 mnemosyne_firefox_prefs
() {
42 if pkginstalled thunderbird
; then
43 cat<<-EOT >> $libdir/${pkg}-${ver}/defaults/pref/firefox.js
44 pref("network.protocol-handler.app.mailto", "${bindir//$pkg/thunderbird}/thunderbird-mailto.sh");