According to 'man apturl', apturl does not come from the Firefox project:
apturl is a simple graphical application that takes an URL (following the
apt-protocol) as a command line option, parses it and carries out the
operations that the URL describes (that is, it asks the user if he wants the
indicated packages to be installed and if the answer is positive does so).
Javascript is a programming language. It is not bad by itself. Proprietary
Javascript is bad. Like any proprietary software written in any programming
language.
'apturl' is distributed under the terms of the GNU GPL:
https://launchpad.net/apturl