Gingerbread Man wrote: If neither of those will do, you can launch the HTML page via an automation utility that will also close the tab for you.
Oh, thanks for the tip!
How did I forget that?!
It's much simpler to close a particular window under Linux of course
Finally, here is a 100% perfect solution:
1) Make sure that you have "/chrome/userChrome.css" under your user mozilla firefox profile directory, and that it includes this line:
Code: Select all
#main-window[title^="WhatsApp"] #nav-bar { visibility: collapse !important; }
2) Create an html file (e.g. named "WhatsAppWeb") with the following contents:
Code: Select all
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>WhatsApp Web Launcher</title>
<script type="text/javascript">
window.open('https://web.whatsapp.com/','myWindow','width=670,height=900,top=0,left=1250');
</script>
</head>
<body>
</body>
</html>
3) Enter the command
Code: Select all
firefox -new-window "/<path>/WhatsAppWeb"
from terminal and allow it to open popup window from now on by saving this preference, and then close firefox window(s).
4) Finally, whenever you want to start WhatsApp Web, run these commands - e.g. from terminal or a .desktop file, via bash script, etc.:
Code: Select all
firefox -new-window "/<path>/WhatsAppWeb" &
sleep 5s
wmctrl -ic "$(wmctrl -lp | grep "$(pgrep firefox)" | grep -v 'WhatsApp - Mozilla Firefox' | tail -1 | awk '{ print $1 }')"
Note: In this last step, WhatsApp Web popup window is launched from a new blank Firefox window, and then that blank window is closed after 5 seconds (which might need to be adjusted according to different conditions), thereby effectively opening a special Firefox window for WhatsApp Web only - nothing more, nothing less