This tutorial was written back in 2009, but might still work on the latest versions.
Hacking Firefox to Always Auto Save Password Without Showing Notification Bar
The required file for this hack is: nsLoginManagerPrompter.js
I am using version 14.0.1 which seems to be the latest version, and this file is still present.
Located here for me: C:/Program Files/Mozilla Firefox/omni.ja!/jsloader/resource/gre/components/nsLoginManagerPrompter.js