Iron Adblocker

Iron Forum for english speaking people

Re: Iron Adblocker

Postby ironuser » Wed Nov 24, 2010 1:20 am

ironfan wrote:Last late night overcame me this funny micro & soft code, simplifying it as terrible as possible.
Just for fun as another proposal:
Code: Select all
http = new ActiveXObject("Microsoft.XMLHTTP");
fso = new ActiveXObject("Scripting.FileSystemObject");
http.open("GET", "https://secure.fanboy.co.nz/opera/urlfilter.ini", false); 
http.setRequestHeader("Accept","text/html");
http.send();
f=fso.CreateTextFile("E:/IronPortable/Iron/adblock.ini", true);
f.Write((http.responseText.replace(/\*/g,"")).replace(/#/g,"# "));
f.Close();

As a *.js-file it needs the freaky windows host script.


Thanks.
This works as well as the other scripts. Only real difference is that there isn't a notification that it has been done, and that is not all that important to me. Otherwise the output is the same, and the adblock.ini appears to be working well.
ironuser
 
Posts: 386
Joined: Mon Feb 01, 2010 12:29 am


Re: Iron Adblocker

Postby ligerTiger » Wed Nov 24, 2010 7:33 am

I think i give up, this is too difficult for a newbie like me but big thanks to you for trying to help me understand.

What is the second best option ? AdThwart ?

Thank you for your patience !
ligerTiger
 
Posts: 29
Joined: Sun Nov 21, 2010 9:24 pm


Re: Iron Adblocker

Postby ironuser » Thu Nov 25, 2010 12:13 am

What is so hard about putting a file on your desktop to double click to get the latest blocking list?
If fact. the Script in Mine just above, quoted from Ironfan's post a few posts back(and duplicated again below) can be copied easily with the select all prompt in the code box, and pasted in a Notepad document, and saved to your desktop as adblock.js. The only thing you will need to do is change the line with the adblock.ini listed in it to reflect the path your Iron is installed.
I have even changed the line to where your Iron is probably installed.
Code: Select all
http = new ActiveXObject("Microsoft.XMLHTTP");
fso = new ActiveXObject("Scripting.FileSystemObject");
http.open("GET", "https://secure.fanboy.co.nz/opera/urlfilter.ini", false); 
http.setRequestHeader("Accept","text/html");
http.send();
f=fso.CreateTextFile("C:/Program Files/SRWare Iron/adblock.ini", true);
f.Write((http.responseText.replace(/\*/g,"")).replace(/#/g,"# "));
f.Close();


If that is too hard, you need to learn to use some of the tools Windows comes with. I am not trying to be mean. But there are some very useful tools in Windows that can help tremendously.
ironuser
 
Posts: 386
Joined: Mon Feb 01, 2010 12:29 am


Re: Iron Adblocker

Postby ligerTiger » Thu Nov 25, 2010 8:36 am

Thank you for your reply !

You wrote " If fact. the Script in Mine just above, quoted from Ironfan's post a few posts back(and duplicated again below) can be copied easily with the select all prompt in the code box, and pasted in a Notepad document, and saved to your desktop as adblock.js. The only thing you will need to do is change the line with the adblock.ini listed in it to reflect the path your Iron is installed.
I have even changed the line to where your Iron is probably installed "

Thank you very much for doing this easier , I will give this a try, it sounds easy even for me :)
ligerTiger
 
Posts: 29
Joined: Sun Nov 21, 2010 9:24 pm


Re: Iron Adblocker

Postby ironfan » Thu Nov 25, 2010 8:03 pm

The adblock-update.vbs of Scream81 is very well linkable and works via left doubleclick like an exe-file.
Perhaps anybody here with a *.bat-file just for fun?

For all operating systems php-scripts would be appropriate also for this object.
Then you need something like XAMPP, a wonderful padding for the web.
So you can have own dynamic local websites tab by tab with the www.
ironfan
 
Posts: 77
Joined: Sun Dec 28, 2008 10:10 am


Re: Iron Adblocker

Postby ligerTiger » Thu Nov 25, 2010 8:48 pm

Hello !

I reinstalled iron and deleted the SRWare iron file so everything was new before I did what You wrote " If fact. the Script in Mine just above, quoted from Ironfan's post a few posts back(and duplicated again below) can be copied easily with the select all prompt in the code box, and pasted in a Notepad document, and saved to your desktop as adblock.js. The only thing you will need to do is change the line with the adblock.ini listed in it to reflect the path your Iron is installed.
I have even changed the line to where your Iron is probably installed.

I now have the script on my desktop (opened it with notepad++ ). Nothing happens when i double klick it but thats ok i suppose.

How can i see that it works as it should ?
ligerTiger
 
Posts: 29
Joined: Sun Nov 21, 2010 9:24 pm


Re: Iron Adblocker

Postby ironuser » Fri Nov 26, 2010 12:11 am

Look in the SRWare Iron folder. There is a file there labeled adblock.ini. If it is more than 0 bytes, chances are soemthing changed it.
Also, open it with Notepad. you should see something similar to this at the top of the file.
# Fanboy's Adblock list (Opera)
# Checksum: SoZdEFVlzI7fveUmfTwEzg
# Updated: 25 Nov 2010
# License: http://creativecommons.org/licenses/by/3.0/
# Contact: fanboyadblock @ fanboy . co . nz http://fanboy.co.nz/adblock

Note the date in the Updated: line! If it is current, then next time you update it check the date again to be sure it is updating when you double click that file.

If it is a small file, it didn't update. You may need to EDIT the path to your Iron Installation.
ironuser
 
Posts: 386
Joined: Mon Feb 01, 2010 12:29 am


Re: Iron Adblocker

Postby ironfan » Fri Nov 26, 2010 1:00 pm

The js ist only a minimalistic test for fun, which could be elaborated.
js needs windows script host via right click - otherwise its opened in the editor and its not linkable.

Scream81 offers an additional linklist for individual adblocking.
adblock-update.vbs already has these features.
It runs like exe, so why not use it.

A workaround by fanboy perhaps will make user scripts dispensable.
ironfan
 
Posts: 77
Joined: Sun Dec 28, 2008 10:10 am


Re: Iron Adblocker

Postby ligerTiger » Fri Nov 26, 2010 9:55 pm

Ironuser, everything works fine !

I had this in my adblock file :

# Fanboy's Adblock list (Opera)
# Checksum: SoZdEFVlzI7fveUmfTwEzg
# Updated: 25 Nov 2010
# License: http://creativecommons.org/licenses/by/3.0/
# Contact: fanboyadblock @ fanboy . co . nz http://fanboy.co.nz/adblock

and its a big file.

Ironfan, many thanks for your replies also !

But if i understood right about the adblock.js is that it maybe dont work in the future.

So, if i want to be sure that everything works i should do as in the link viewtopic.php?f=18&t=1971 :?:

It would be nice to know that the updates works so you don´t have to check it all the time to be sure.
ligerTiger
 
Posts: 29
Joined: Sun Nov 21, 2010 9:24 pm


Re: Iron Adblocker

Postby ironuser » Sat Nov 27, 2010 12:54 am

@ligertiger, glad the script worked for you!
I didn't take the time to re-orient myself with the link you quoted. But if you will look at the js file(right click, edit, but don't do anything!) you will notice there is a reference to https://secure.fanboy.co.nz/opera/compl ... filter.ini or something similar. The urlfilter.ini is the opera version of the Iron adblock list. What the script does is 'get' that file, make it work for Iron, then save it (overwrite if necessary) to adblock.ini.

There is another script that do a little popup telling you the update was done. It 'get's the same Opera file, does it's thing to change it Iron format, and saves it telling you that the operation has been completed. That one is the adblock_update.vbs file that is in one of the adblock postings in these forums.

We will have to wait to see what Fanboy does in the future to see how things will work out.
ironuser
 
Posts: 386
Joined: Mon Feb 01, 2010 12:29 am


PreviousNext

Return to SRWare Iron Support (English)

Who is online

Users browsing this forum: No registered users and 18 guests

cron