Falkon Adblock popup blocking

In the Qt5 it was not easily possible to block the new (popup) window request because the function “createWindow” which handles the window creation did not provide the required information (destination URL). It was not imposibble but not straightforward either, so it was not implemented. It Qt6.2 there is a new signel “newWindowRequested” which provides the destination url and also if the request was initiated by human or not. This is ideal for selective blocking of the window creation, eg. popup blocking in AdBlock.

Falkon part

To implement this in AdBlock (which is an extension), I first modified the main Falkon code to move from the “createWindow” implementation to “newWindowRequested”. I used this chance to add an option to preferences to “Block automatic popups” which are all popups not originating from human interaction (or so I hope).

Next I went and implemented similar (more like same) plugin interface which is used for “acceptNavigationalRequest” function and which is also available for plugins. Having an example is awesome. Also Falkon has multiple APIs for extensions. The C++ is straghtforward normal code, Python I hope will catch it all as well (I truly just hope) and Qml needs special attention since it is manualy made API contrary to Python support which is mostly automatically generated (even when it produces a lot of warnings).

The results can be seen in the merge request 120.

AdBlock part

The AdBlock part of the implementation is relatively simple. I tried to reuse the original code for network interceptor, since it looks and behave the same way and done. Well, it was simple after the needed API was introduced. The implementation passes both Popup and Popup Exception testpages.

The results can be seen in the merge request 121.

Conclusion

As the popups are the most annoying part of advertisements and very important part of adblockers it is great that it is now possible to block them in Falkon as well.

This continues my lurking around Falkon AdBlock code. The number of supported features is slowly increasing (but it gets me a good headache while working on it).

I also updated the Falkon ABP Test Page results.

Articles from blogs I follow:

What if one of your online friends dies unexpectedly?

A lot of people experience online friends "vanishing" without notice. A new nonprofit project tries to help prevent this issue.

via unixdigest.com January 10, 2025

Calamares towards 3.3.11

I’m going to change up the Calamares release process a little. It’s been slow going as a community-maintained project – which isn’t to say that that is a bad thing. Just slow. I’ve decided to make releases marginally more predictable than “when [ade] has …

via [bobulate] October 24, 2024

Signing Android Apps Using a YubiKey (on NixOS)

In my spare time, I currently develop two Android apps using Flutter: AniTrack, a simple anime and manga tracker based on my own needs, and Moxxy, a modern XMPP client. While I don't provide release builds for AniTrack, I do for Moxxy. Those are signed u…

via PapaTutuWawa's Blog July 24, 2023

Generated by openring