webOS Nation Forums >  webOS apps and software >  webOS development > App Request: Adblocking in Browser
App Request: Adblocking in Browser

  Reply
 
LinkBack Thread Tools Display Modes
Old 08/19/2009, 09:37 AM   #1 (permalink)
Member
 
Join Date: Jul 2009
Posts: 4
Likes Received: 0
Thanks: 0
Thanked 1 Time in 1 Post
Exclamation App Request: Adblocking in Browser

Hey everybody, I'm sure everybody of you knows Adblock Plus, a really handy extension for the Firefox Browser.

addons.mozilla.org/de/firefox/addon/1865

It blocks out unwanted text ads, flash based ads and graphics that can use up valuable time and traffic.


Since the Pre browser is based on a WebKit engine and not a Gecko engine, it's not possible to port the extension over to the Pre directly.

Some iPhone developers have written an adblocking solution for mobile Safari, which is based on WebKit also.

cocoamug.com/adblock/index.html

I think that on a mobile device, every ad that takes up real estate on the small screen is annoying. It would be great if somebody could come up with an adblocking solution for the Palm Pre.

Youxing
youxing is offline   Reply With Quote
Old 08/19/2009, 11:41 AM   #2 (permalink)
Member
 
morningisbad's Avatar
 
Join Date: Nov 2007
Location: La Crosse, WI
Posts: 126
Likes Received: 0
Thanks: 40
Thanked 7 Times in 7 Posts
Default

it would also speed up the internet when im stuck on 1x. not having to load that extra image (or flash object when palm gets that goin) would be a nice boost.
morningisbad is offline   Reply With Quote
Old 08/19/2009, 12:41 PM   #3 (permalink)
WebOS Developer
 
kesne's Avatar
 
Join Date: Jun 2009
Location: Portland, Oregon
Posts: 491
Likes Received: 0
Thanks: 22
Thanked 118 Times in 31 Posts
Default

EDIT: Ahh, wrong area, sorry!
__________________
kesne is offline   Reply With Quote
Old 08/19/2009, 12:43 PM   #4 (permalink)
Member
 
Blubble's Avatar
 
Join Date: Jun 2009
Location: Silicon Valley, California
Posts: 1,025
Likes Received: 0
Thanks: 37
Thanked 444 Times in 161 Posts
Default

This would be a great addon. It's definitely something I would pay for.
Blubble is offline   Reply With Quote
Old 08/19/2009, 03:10 PM   #5 (permalink)
Homebrew Developer
 
enormous's Avatar
 
Join Date: Dec 2007
Location: D.C. Area
Posts: 195
Likes Received: 0
Thanks: 73
Thanked 39 Times in 20 Posts
Default

I just downloaded an ad-blocking hosts file and appended it to my /etc/hosts. No more ads!
enormous is offline   Reply With Quote
Thanked by Abyssul, billybennett, yokken
Old 08/19/2009, 03:17 PM   #6 (permalink)
Member
 
Join Date: Jul 2008
Posts: 334
Likes Received: 0
Thanks: 66
Thanked 76 Times in 33 Posts
Default

Quote:
Originally Posted by enormous View Post
I just downloaded an ad-blocking hosts file and appended it to my /etc/hosts. No more ads!
I can't believe I didn't think of this! Good stuff man thanks.
billybennett is offline   Reply With Quote
Old 08/19/2009, 04:39 PM   #7 (permalink)
Member
 
Join Date: Jun 2009
Posts: 228
Likes Received: 0
Thanks: 14
Thanked 14 Times in 11 Posts
Default

Quote:
Originally Posted by enormous View Post
I just downloaded an ad-blocking hosts file and appended it to my /etc/hosts. No more ads!
Care to tell us where you got it?
Sunsparc is offline   Reply With Quote
Old 08/19/2009, 06:33 PM   #8 (permalink)
webOS Enthusiast
 
Abyssul's Avatar
 
Join Date: Jul 2009
Posts: 2,132
Likes Received: 45
Thanks: 41
Thanked 807 Times in 433 Posts
Default

To use an ad-blocking hosts file:

Root:
-Download file from [URL="
-Copy hosts file to Pre USB storage
-Open root
-Type in
[code]
mount -o remount, rw /

cp /media/internal/Hosts /etc/hosts
[/code]

WebOS Quick Install:
-Run Webos quick install
-Download hosts file
-Go to Tools - send file
-For destination, set it to /etc/hosts
-Then select the hosts file in the file input box.
-Click Send to Device


There you go. Should work. They update the file almost every day so you can manually update it every week. If you are more experienced they provide a linux bash script that will update with a cronjob.

If this works, don't forget to thank me.
__________________


If I helped you or you have downloaded one of my files,
then least you could do is click the "Thanks" button.

Last edited by Abyssul; 08/21/2009 at 10:41 AM.
Abyssul is offline   Reply With Quote
Old 08/19/2009, 07:27 PM   #9 (permalink)
Member
 
jp22382's Avatar
 
Join Date: May 2009
Location: Seattle
Posts: 364
Likes Received: 0
Thanks: 173
Thanked 200 Times in 47 Posts
Default

Great idea, used WebOS Quick Install and this http://jamesisbored.com/iphone/content/hosts.php

Seems to be working pretty well so far.
jp22382 is offline   Reply With Quote
Old 08/19/2009, 09:13 PM   #10 (permalink)
Member
 
morningisbad's Avatar
 
Join Date: Nov 2007
Location: La Crosse, WI
Posts: 126
Likes Received: 0
Thanks: 40
Thanked 7 Times in 7 Posts
Default

Quote:
Originally Posted by Abyssul View Post
To use an ad-blocking hosts file:

-Download file from here
-Copy hosts file to Pre USB storage
-Open root
-Type in
Code:
mount -o remount, rw /

cp /media/internal/Hosts /etc/hosts
There you go. Should work. They update the file almost every day so you can manually update it every week. If you are more experienced they provide a linux bash script that will update with a cronjob.

If this works, don't forget to thank me.
could you repost the link? or check it? it appears to be broken
morningisbad is offline   Reply With Quote
Old 08/19/2009, 09:25 PM   #11 (permalink)
webOS Enthusiast
 
Abyssul's Avatar
 
Join Date: Jul 2009
Posts: 2,132
Likes Received: 45
Thanks: 41
Thanked 807 Times in 433 Posts
Default

Quote:
Originally Posted by morningisbad View Post
could you repost the link? or check it? it appears to be broken
Hmm... thats weird. I was just browsing that website a few hours ago. They must be down temporally. In the meantime, use the link jp22382 provided. It should work.

http://jamesisbored.com/iphone/content/hosts.php
__________________


If I helped you or you have downloaded one of my files,
then least you could do is click the "Thanks" button.
Abyssul is offline   Reply With Quote
Old 08/19/2009, 11:28 PM   #12 (permalink)
Member
 
Join Date: Jun 2009
Posts: 228
Likes Received: 0
Thanks: 14
Thanked 14 Times in 11 Posts
Default

I can post my modified hosts file if anyone wants.


It's a combination of the file from MVPS.org and SaferNetworking's Spybot S&D program hosts file generator.

Last edited by Sunsparc; 08/19/2009 at 11:46 PM.
Sunsparc is offline   Reply With Quote
Old 08/20/2009, 08:15 AM   #13 (permalink)
Member
 
Join Date: Jul 2009
Posts: 4
Likes Received: 0
Thanks: 0
Thanked 1 Time in 1 Post
Default

That would be great if you could post your host file! Thanks for your responds

//EDIT: BTW: I just thought of that! Using that huge host file from MVSP.org, does that actually slow down the performance of the Pre?

Last edited by youxing; 08/20/2009 at 08:29 AM.
youxing is offline   Reply With Quote
Old 08/20/2009, 08:59 AM   #14 (permalink)
Member
 
Join Date: Jun 2009
Posts: 228
Likes Received: 0
Thanks: 14
Thanked 14 Times in 11 Posts
Default

Quote:
Originally Posted by youxing View Post
That would be great if you could post your host file! Thanks for your responds

//EDIT: BTW: I just thought of that! Using that huge host file from MVSP.org, does that actually slow down the performance of the Pre?

Not that Ive seen. Web browsing is indeed a lot faster without the ads.

I'll edit in the link to my hosts file when I get home. I dont have access to the phone over EVDO, just Wifi.
Sunsparc is offline   Reply With Quote
Old 08/20/2009, 09:02 AM   #15 (permalink)
Homebrew Developer
 
enormous's Avatar
 
Join Date: Dec 2007
Location: D.C. Area
Posts: 195
Likes Received: 0
Thanks: 73
Thanked 39 Times in 20 Posts
Default

Quote:
Originally Posted by youxing View Post
//EDIT: BTW: I just thought of that! Using that huge host file from MVSP.org, does that actually slow down the performance of the Pre?
I haven't noticed any slow down on my web browsing, and my hosts file is very large.
enormous is offline   Reply With Quote
Old 08/20/2009, 09:19 AM   #16 (permalink)
Member
 
Join Date: Nov 2000
Location: Austin, TX, USA
Posts: 171
Likes Received: 0
Thanks: 1
Thanked 10 Times in 4 Posts
Default

The hosts file is only used during DNS lookup, then the address is cached in the browser. It's much faster to look locally on the device for the name than the query a remote DNS server, so it should be faster with all of those names there.
__________________
Developer Advocate, HP webOS GBU
bcombee is offline   Reply With Quote
Old 08/20/2009, 10:56 AM   #17 (permalink)
Member
 
Join Date: Apr 2008
Posts: 259
Likes Received: 0
Thanks: 8
Thanked 64 Times in 30 Posts
Default

Quote:
Originally Posted by Abyssul View Post
To use an ad-blocking hosts file:

-Download file from here
-Copy hosts file to Pre USB storage
-Open root
-Type in
Code:
mount -o remount, rw /

cp /media/internal/Hosts /etc/hosts
There you go. Should work. They update the file almost every day so you can manually update it every week. If you are more experienced they provide a linux bash script that will update with a cronjob.

If this works, don't forget to thank me.
You know, Linux computers have this nifty little command called "wget" that allows you to download anything directly from the command line.


# cd /etc/
# mv hosts hosts.backup # always backup what you overwrite
# wget http://hostsfile.mine.nu/Hosts -O hosts


On a tangential note, most people don't know that you can install any homebrew app directly in two steps from the command line:

# ipkg -o /var install http://www.packagedownloadurl.com/filename.ipk
# /usr/bin/luna-send palm://com.palm.applicationManager/rescan {}


Instead of having to type the long luna-send line above, you can just create a short script /usr/bin/luna-rescan with the contents:

#!/bin/sh
/usr/bin/luna-send palm://com.palm.applicationManager/rescan {}


and then type chmod 755 /usr/bin/luna-rescan to make it executable ... then you can just type "luna-rescan" anytime you make a change or install a new app.

Ok, enough tips and tricks for now.
xcomputerman is offline   Reply With Quote
Old 08/20/2009, 01:12 PM   #18 (permalink)
webOS Enthusiast
 
Abyssul's Avatar
 
Join Date: Jul 2009
Posts: 2,132
Likes Received: 45
Thanks: 41
Thanked 807 Times in 433 Posts
Default

I had forgotten about the "wget" function, but it should work regardless.
__________________


If I helped you or you have downloaded one of my files,
then least you could do is click the "Thanks" button.
Abyssul is offline   Reply With Quote
Old 08/20/2009, 08:32 PM   #19 (permalink)
Member
 
Join Date: Aug 2009
Posts: 1
Likes Received: 0
Thanks: 1
Thanked 0 Times in 0 Posts
Default

@jp22382

I feel lost...I just started using WebOS Quick Install, how do I use it to add the hosts.php? Really appreciate the help. Thanks in advance!
meinvein is offline   Reply With Quote
Old 08/21/2009, 06:46 AM   #20 (permalink)
Member
 
Join Date: Jul 2009
Posts: 4
Likes Received: 0
Thanks: 0
Thanked 1 Time in 1 Post
Default

First of all, you need to rename hosts.php to hosts (without extension). Then, you need to upload it to your phone into the folder "etc"

The path should be /etc/
If that doesn't work, try uploading as /etc/hosts

Unfortunately, I don't have the Pre to test it yet.
I used PuTTY to get access to Linux, but it was just the emulator. It worked great there!
youxing is offline   Reply With Quote
Reply

 

Tags
ads, blocking, web browser

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0