Theoretically, it doesn't. Practically, it would be a complete nightmare, as you'd have to decompile the source code into a high level language, then come up with some kind of (proper) hack, and run a code insertion tool in your browser to reinsert the changes. And they'd probably break any time Facebook altered their code at all, and moreover, FB could use a polymorphic compiler to make such things impossible. And finally, decompiling the program would probably be illegal if it was to circumvent the intended use of the site:
https://en.wikipedia.org/wiki/Decompiler#Legality