GUIDE: Adblocker for IE8 (from adblock plus) (list updated regularly)

Very nice.

Thanks for your job.

It would be so nice to show us how you compile your xml file from adblock plus filter list.

What script to execute into PowerShell ?

Thank you.
 
Last edited:
Very nice.
...What script to execute into PowerShell ?

Thank you.

Sorry, missed your post. Theres was something missing in the original one (highlighted in red). It should be:
Code:
Get-Content input.txt | foreach { $_ = $_.trim(); $_ } | foreach { 
$_ = @"
<item>
    <description>$_</description>
    <wf:blockRegex>
        <![CDATA[$_]]>
    </wf:blockRegex>
<[COLOR="Red"]/[/COLOR]item>
"@; $_ } | foreach { Add-Content output.txt $_ }

Found out the hard way 1st time I ran it :D
I've been reading all the powershell tutorials on technet, its quite a very useful tool

Thanks again for this, I've been telling some associates.

You're welcome :)
 
It's amazing! :D

And I never make mistakes! You just made that up! :mad:



:p

Actually looking at it again the first foreach block could probably be shortened to

Code:
foreach { $_.trim() }

If the result of a method isn't assigned to anything, it gets dumped out to the pipeline anyway - no need to assign it to $_ just to dump it again.
 
It's amazing! :D

And I never make mistakes! You just made that up! :mad:



:p

Actually looking at it again the first foreach block could probably be shortened to

Code:
foreach { $_.trim() }

If the result of a method isn't assigned to anything, it gets dumped out to the pipeline anyway - no need to assign it to $_ just to dump it again.


:p I modified it and it works, thx :)


I don't suppose this has been updated to take care of the hotmail adds since the face lift that happened today? :(


I just checked it, even with the facelift, the ads are still blocked :)
 

Sorry, missed your post. Theres was something missing in the original one (highlighted in red). It should be:
Code:
Get-Content input.txt | foreach { $_ = $_.trim(); $_ } | foreach { 
$_ = @"
<item>
    <description>$_</description>
    <wf:blockRegex>
        <![CDATA[$_]]>
    </wf:blockRegex>
<[COLOR="Red"]/[/COLOR]item>
"@; $_ } | foreach { Add-Content output.txt $_ }

Found out the hard way 1st time I ran it :D
I've been reading all the powershell tutorials on technet, its quite a very useful tool

Thank you to both :p
 
Could be, I suppose. Odd considering I use Office/SkyDrive's online storage myself, but I think I might know what's going on (I think my security software is the culprit). Hopefully it'll work. :D
 
Back
Top Bottom