📜 ⬆️ ⬇️

We remove advertising in Opera Mobile


Good day, habrayuzer!
I want to talk about how to get rid of annoying ads, if you often have to use a Symbian smartphone or a Windows Mobile device on board. The solution is quite trivial, I won’t be surprised if many people know this method, but nobody wrote about it at Habrahabr. If interested - the details under the cut.

Introduction


Users of the desktop version of Opera use UserCSS and Urlfilter to combat advertising from ancient times. This method has many advantages and very few flaws, as it turned out, works quite well in mobile versions of Opera, in addition to OperaMini. Operability was tested using Opera Mobile 10 and the Nokia 5530 phone, but it seems to me that the versions of Opera Mobile for other platforms will not be an exception.

How it works

Urlfilter

Urlfilter - built-in unwanted content filter in the opera, works on the mask, which is located in the urlfilter.ini file. The file has the following structure:

Opera Preferences version 2.1
; Do not edit this file while Opera is running
; This file is stored in UTF-8 encoding

[prefs]
prioritize excludelist=1

[include]
*
[exclude]

')
The [exclude] section records filter values. An example of the urlfilter.ini file can be viewed here or here . I note that with a large number of entries, the browser may slow down. I will also say that it is better to make the rules adapted to the most visited sites.
To urlfilter.ini earned you need to save it to your phone. For example, for Symbian, the path to the file would be:!: / System / Data / OperaMobile / urlfilter.ini
Or, as an option, save it to any place, go to opera: config in the phone's browser and in the Network - URL Filter File section specify the path to the file.

UserCSS

However, I personally prefer the second method, using UserCss. An example can be found here . Discussion and developers here . For Symbian, place the file in!: / System / Apps / OperaMobile / styles / adblock.css
Or at the address opera: config in the section User Prefs - Local CSS File specify the path to it. And do not forget to scroll down and click the "Save" button (separate for each section).

Conclusion


Separately, I want to note that not only images are filtered, but scripts if desired. And this reduces the number of connections and, as a result, increases the speed of work. Filtered content - does not load, and this significantly saves traffic.
And once again, the article is exclusively for those users who, by chance, do not know anything about these not obvious features of Opera Mobile. I would be glad to make comments.

UPD1 transferred to Opera blog, thanks for the karma.
UPD2 corrected article. Thanks to the microKot for clarification.

Source: https://habr.com/ru/post/97748/


All Articles