Fixing Facebook in Konqueror

Posted in:

I got fed up waiting for Facebook to fix their website that recently broke in Konqueror, so I did it myself. I was correct in thinking that the problem was just this line of code:

delete Object.prototype.eval;

...which seems to serve no purpose in other browsers, but deletes the global 'eval' function in Konqueror (as you would expect from the ECMA 262, Edition 3 specification). Konqueror doesn't have a GreaseMonkey equivalent (yet), so here is a quick summary of how to do an equivalent hack.

  • Install privoxy

    wajig install privoxy

    (assumes you are using Debian/Ubuntu and have wajig installed).

    NB: Privoxy does all kinds of other web filtering by default. If you don't like that, as I don't, just truncate the original config 'action' files:

    cd /etc/privoxy/
    sudo rm *.action
    sudo touch global.action default.action standard.action user.action
  • Configure Konqueror to use, port 8118 as the HTTP proxy (use 'Manually specify the proxy settings' and press 'Setup').

  • Configure Privoxy to redirect one javascript file to a different version that removes the offending line of code, by adding the following lines to /etc/privoxy/user.action:

    { +redirect{} }

    (of course, this will break as soon as Facebook update this file).

  • Check that privoxy and the redirect are working by going to:

    You are looking for a line that says:


Assuming it all worked, you should now have a functional Facebook again! (I do, anyway)

For performance, in Konqueror configuration you can add '' as the only domain to go through the proxy (you have to enable a check box and add the domain to a list, it's fairly obvious in the GUI). You should do this after you have checked it is all working, as otherwise even the address that we used for checking won't be redirected to the proxy, and will instead go to a page on the real internet telling you that your privoxy setup isn't working.

Comments §

Comments should load when you scroll to here...