Sticky post
What this blog is about.
Tuesday, October 16, 2007 1:24:16 PM
This blog will primarily be the place through which I release my advanced content blocker/ad filter for opera base on javascript.
To make a custom filter you must have a file with this:
Code in it, where you replace {white} by allowed sites (or you can just delete that part) and {black} by disallowed sites. The content must be regexp valid and either be totally encapsulated in () or consist of separate alteration sections encapsulated in (). Also the filename must come before filterengine.js when sorted in alphabetical order.
The latest version will always be available through here:
adfilter.zip
aaaa-customlist.js
aaaa-filterset.g.js
filterengine.js
-Ghost-
To make a custom filter you must have a file with this:
var ujs_white_array;
var ujs_black_array;
if (!ujs_white_array) ujs_white_array = [];
ujs_white_array.push("{white}");
if (!ujs_black_array) ujs_black_array = [];
ujs_black_array.push("{black}");
Code in it, where you replace {white} by allowed sites (or you can just delete that part) and {black} by disallowed sites. The content must be regexp valid and either be totally encapsulated in () or consist of separate alteration sections encapsulated in (). Also the filename must come before filterengine.js when sorted in alphabetical order.
The latest version will always be available through here:
adfilter.zip
aaaa-customlist.js
aaaa-filterset.g.js
filterengine.js
-Ghost-
Partial rewrite
Friday, October 19, 2007 6:08:16 PM
Okay this project has changed a little. From now on the filters themself are separate js files. There is now one engien file called filterengine.js. Then there are the filtersets/lists, they contain very little code:
{white} and {black} are respectively replaced by allowed and disallowed stuff (whitelists are basically exceptions to the blacklists). These files will usually start with aaaa- if they come from me. This due to the fact that Opera loads UserJS scripts in alphabetical order and the filterset files need to be loaded before the engine. So if you want to make your own set, make sure they come in the alphabet before filterengine.js. Because of this change there are now several files you will need. I will always post a zip file with all 3 (currently) files in it and the file that has been changed. The main post will contain the latest versions of all 3.
adfilter.zip
aaaa-customlist.js
aaaa-filterset.g.js
filterengine.js
Many thanks to fearphage for suggesting this system and also Ayush for a little help
.
-Ghost-
var ujs_white_array;
var ujs_black_array;
if (!ujs_white_array) ujs_white_array = [];
ujs_white_array.push("{white}");
if (!ujs_black_array) ujs_black_array = [];
ujs_black_array.push("{black}");
{white} and {black} are respectively replaced by allowed and disallowed stuff (whitelists are basically exceptions to the blacklists). These files will usually start with aaaa- if they come from me. This due to the fact that Opera loads UserJS scripts in alphabetical order and the filterset files need to be loaded before the engine. So if you want to make your own set, make sure they come in the alphabet before filterengine.js. Because of this change there are now several files you will need. I will always post a zip file with all 3 (currently) files in it and the file that has been changed. The main post will contain the latest versions of all 3.
adfilter.zip
aaaa-customlist.js
aaaa-filterset.g.js
filterengine.js
Many thanks to fearphage for suggesting this system and also Ayush for a little help
.-Ghost-
Small bug fix release
Wednesday, October 17, 2007 1:46:05 PM
A small release that fixes a bug where the iframe content wasn't properly loaded yet, causing errors and not folding the iframe.
DL is available in teh main post ^.
-Ghost-
DL is available in teh main post ^.
-Ghost-
Small update
Tuesday, October 16, 2007 2:24:55 PM
Fixed a few small inconsistencies, the DL has been updated.
-Ghost-
-Ghost-
New Release.
Tuesday, October 16, 2007 11:03:20 AM
Well I said I was gonna do weekly releases, but I was wrong. Fearphage massively cleaned up the script and with help from Ayush and various other people in the #weekly channel on irc.opera.com there have been several improvements.
I have also added some more URL's to the filter. It still uses the same filterset.g though.
filterset.g.js
-Ghost-
I have also added some more URL's to the filter. It still uses the same filterset.g though.
filterset.g.js
-Ghost-
First filterset.g.js version.
Monday, October 15, 2007 2:03:13 PM
So what is Filterset.g.js? Basically its a adaption of the filterset.g (from pierceive) that blocks ads on pages. It blocks a whole lot of apps, and in addition to the ones filterset blocks I also added the stupid google apps.
It can detect: images, iframes, any kind of object, applet or flashapp and offsite javascripts.
So attached to this post is the first release. I will provide a new version every week if piercieve has update the list in that week.
If you have suggestions for other things I should block please feel free to tell me so.
So here is version 1.0.filterset.g.js
Installing is really simple, just put the file in some folder on your HDD (like c:\userjs or /userjs) then go to tools -> preferences -> advanced -> content -> javascript options, then set the directory where you put the file as User javascript Files folder.
-Ghost-
P.S.
Many thanks to pierceive and the owner of this site: http://www.howtocreate.co.uk/operaStuff/userJavaScript.html (TarquinWJ?) as I based the script on his "black external" script.
It can detect: images, iframes, any kind of object, applet or flashapp and offsite javascripts.
So attached to this post is the first release. I will provide a new version every week if piercieve has update the list in that week.
If you have suggestions for other things I should block please feel free to tell me so.
So here is version 1.0.filterset.g.js
Installing is really simple, just put the file in some folder on your HDD (like c:\userjs or /userjs) then go to tools -> preferences -> advanced -> content -> javascript options, then set the directory where you put the file as User javascript Files folder.
-Ghost-
P.S.
Many thanks to pierceive and the owner of this site: http://www.howtocreate.co.uk/operaStuff/userJavaScript.html (TarquinWJ?) as I based the script on his "black external" script.











