Oldest known version of this page was edited on 2006-01-18 09:08:18 by BurnOut426 []
Page view:
An alternative implementation of OperaPythonAdblock in blazing fast C++.
Update: cpp_adblock-v.05beta2
Got rid of the data uri method for inputting filters and styles in the address bar. Now, the add style/filter page is an actual html file and uses an input box, which means you don't have to worry about escaping certain characters. Updated install.txt to reflect the extra file.
Also, fixed the cpp_adblock binary so it won't add a duplicate entry to adblock.css.
Also, put remove directions in adblock.css and filter.ini
Update: cpp_adblock-v.05beta1.
This version has ~52 adblocking entries added to the default menu, which means there are a boatload of blocking options. This version now supports adding to filter.ini when you collapse something with certain css options. You can also manually add and remove entries from filter.ini and adblock.css. It supports CSS substring, prefix, suffix and absolute attribute selectors. Plus, you can add your own. If you do not like how the commands are set up, just edit the included menu to your liking.
The zip file contains win32 binaries, linux binaries, source and directions. If on linux, just install unzip so you can extract the files.
I've been testing this version on both WinXP? and Debian Woody and it's working great.
You want to use this with OPera 9.0TP1 or newer to get the most out of it.
Update: Here's a new adblock menu that I'm testing for cpp_adblock that's made from Opera 9.0TP1's default menu. This one has support for matching via a substring of a source (because Opera 9 has support for some CSS3 selectors now). There are a whole bunch of different blocking options under the hotclick popup menu now; including blocking via css signatures. (Comment out the ones you don't want to use). Just like before, you need to edit the menu and replace each instance of %appdata% with the path to your application data directory that the cpp_adblock directory is in.
Also, there's a new overlay.css included that now overlays img elements too.
I also added an "add style" option to the adblock menu. When you click on Adblock -> "Add style", it opens up a new page with a blank plain text data uri. Type the path or partial path after the comma in the address field and hit enter. Then, the text will appear on the page where you can then select it and use the right-click menu to add it to adblock.css with the rule of your choice. Again, you can comment out rules you don't use by editing cpp_adblock_menu.ini. You can also add your own rules. Just look at the existing commands in the ini file as a reference.
Since the whole process is dependent on the menu commands and overlay.css, you can customize it to how you like it.
Download: C++ Adblock v.04
This one uses an installer to handle *some* of the installation and has a few improvements. See included change log. It works fine for me, but just in case, v.03 is still available.
(Directions for installing are included in the zip file)
Download: Alternate version of v.04
This one is for installing directly to the opera directory and is much simpler to setup.
Download: Linux version of v.04
Should work the same as the others, but it's not tested on linux. You have to build the program first for one, but you may also have to tweak the program to get it to work as it may not be right. Feel free to fix it and update the page.
Download: C++ Adblock v.03
Note: Because of a possible bug (bug-168565 for review) in Opera 8, you may not be able to block URIs that are long enough to cause the length of the command, that Opera uses to load cpp_adblock.exe, to be longer than the limit for your OS. If you try to, Opera won't execute cpp_adblock.exe and will just show an out of memory error.
On WinXP? and Server 2K3, if Opera is using the proper method to load executables when you use the 'Execute program' command, the command limit is 2^15. On earlier OSs, the limit is much smaller.
For win98, the best bet would be to put cpp_adblock.exe in c:\ and put your style sheets in c:\styles. Putting cpp_adblock.exe in c:\ will shorten the length of the command used to load cpp_adblock.exe. (You'll need to adjust all the paths in the cpp_adblock_menu.ini and the paths to the css files in Opera6.ini to match the new locations). Also, for the 'block this src' command, you can trim it down to just *[src='%c'] so the command will be even shorter, which might help a little.
(Do note that this might not be a bug, it might be Opera's way of not even trying to execute a command that is longer than the limit for the OS.)
CategoryOpera
CategoryTechnical