Monday, September 28, 2009


This past week the adblock branch was finally merged into Arora's master branch. A way to block content was one of the first issues opened (issue #24) and was the issue with the most stars/votes. After a lot of work and research the end results speaks for itself.

A big thanks goes out to Zsombor Gegesy who did a lot of initial development and through his efforts we learned a fair amount about what was needed and what solutions users would not accept. While various browsers have had systems for blocking content the Adblock Plus FireFox plugin has really set the standard for what users expect. A primary feature of Adblock Plus has been the idea of a subscription. Arora's AdBlock attempts to be compatible to the current Adblock Plus system and system supports subscribing to Adblock Plus subscriptions (even supporting abp:// links) and the Adblock Plus rule set.

Adblock is two different blocking systems. The first is network and blocks the downloading of content. The second is about hiding/removing items on the web page. Qt 4.5 users will get the network side in the next Arora release, but for the dom manipulation we currently use QWebElement which is part of 4.6 (if someone wants to make a patch to do this in Javascript the patch would be accepted). Currently the AdBlock in Arora is very simple, but it is enough to be usable and to get feedback on so it was merged in. By default AdBlock is not enabled, but can be easily enabled through the Tools/AdBlock dialog. The major missing features are:
  • The list of items blocked on the current page wasn't ready to be merged in before the string freeze so it will be in the next release.
  • A few AdblockPlus Rule options are not yet supported.
  • When you right click to block something on a webpage it does not show a nice wizard, but just ads the url to the custom rule list.

If you are interested in helping out on these or other AdBlock feature in Arora stop by #arora on All of the AdBlock code in Arora is released under the BSD license and we welcome contributions from other projects that would like to share this feature in their QtWebKit project.

AdBlock will be part of the next Arora release 0.10.0 which will be released Wednesday night / Thursday morning. If you want to help and contribute a translation make sure to submit it before Wednesday.

Thursday, September 24, 2009

Saving Passwords

An early feature request has been for the ability to save passwords so you don't have to re-type in your user name and password all the time when you login to websites. This evening I merged in the autofill branch which add this functionality to Arora. When you log into a website it will ask you if you want to save the form. Then when you go back to that website it will automatically fill in the form for you.

The patch is really just the start of this feature. At the moment it simply saves forms to a file in the Arora data directory, but going forward it would be good to hook into the existing wallets and at least on Linux there is talk of a dbus spec so we would use KWallet or GnomeKeyRing depending on the desktop we are logged into. Also this feature fully works in Qt 4.5 so everyone can start using it immediately.*

While investigating this feature I discovered that for many users they didn't necessarily want a password manager, but they needed the browser to behave better with how they browsed. When a user logs into most sites the authentication cookie is a session cookie and until they restart their browser they are logged in. This creates two problems:

1) Users that frequently have to restart their browser (such as when I am hacking on QtWebKit) have to re-login over and over even though they logged in just five or ten minutes before. Even with a wallet this is very annoying.

2) Users who have browsers open for a very long time (weeks!) have session cookies that pile up and are never deleted.

For those users I have added the ability to specify what a cookie session is.

*And in the far future when we drop 4.5 we can convert a bunch of large ugly javascript into nice simpler QWebElement code :)

Tuesday, September 22, 2009

Icons In the Menu's

One of the things that I heard when asking how to improve the KDE4 integration was that without icons in the menus it didn't look like a KDE application. Happily in Qt 4.6 there is a collection of new functions that have been added to QIcon. In particular QIcon::fromTheme() was the function I needed to populate Arora's menus with the correct icons from the current KDE and Gnome theme.



Restoring Back/Forward History

When Arora restores the last session (either as the selected preference on startup or selecting the action from the history menu) Arora will load the urls in the tabs, but will doesn't load the back/forward history. The same also happens when you restore the last closed tab (ctrl-t-shift) or re-open one of the previous closed tabs from the history menu. This was feature request 411 and while QtWebKit couldn't do it in the past QWebHistory just recently got two new functions: saveState() and restoreState() which make it possible to have this functionality and the webHistory branch was merged in today and will be part of the next release.

Thursday, September 17, 2009

Hanging Javascript

Occasionally you run across a web page that has some Javascript that can run for a long time, potentially hanging the browser. In Qt 4.6 there is a new function QWebPage::shouldInterruptJavaScript which by default pops up a dialog so the user can stop the JavaScript that is causing the issue. Of course no new feature blog is complete without a screenshot: