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