browser-new-tab 255 B

1234567891011121314
  1. #! /bin/sh
  2. # SocketControl browser extension https://github.com/karabaja4/firefox-socket-control
  3. if [ -S /tmp/firefox.sock ];
  4. then
  5. OPENLINK="$1"
  6. printf "%s" "nt|$OPENLINK" | nc -NU /tmp/firefox.sock
  7. exit 0
  8. fi
  9. # Failsafe
  10. $BROWSER -new-tab "$1"
  11. exit 0