How to block ads? lets say the ads i want to block is http://foo.com/bla2.gif?.
- 14 Posts
- 0 Reply Likes
Posted 4 years ago
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
- 14 Posts
- 0 Reply Likes
No, the ads i want to block is ads from other sites that use inject javascript to show the ads. can i block it with javascript like popular adblock? just add the domain and the path of js. and it will block it. ex. http://exmaple.com/example.js
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
You can.
- Define the strings you want removed in an array
- Fetch the code page code with ajax
- Loop through your array and remove the strings using regular expressions
- Insert the remaining code into the body element
Note:
1. You should be aware that this might be illegal
2. You should be aware that the original site owner may not like this
- Define the strings you want removed in an array
- Fetch the code page code with ajax
- Loop through your array and remove the strings using regular expressions
- Insert the remaining code into the body element
Note:
1. You should be aware that this might be illegal
2. You should be aware that the original site owner may not like this
JesseMonroy650 (Volunteer), Champion
- 3325 Posts
- 122 Reply Likes
@lynx,
Phonegap is not a webserver or a webbrowser. If you are opening a webpage, you can use the whitelist plugin to mark the domains and servers that are allowed.
Jesse
Phonegap is not a webserver or a webbrowser. If you are opening a webpage, you can use the whitelist plugin to mark the domains and servers that are allowed.
Jesse
Related Categories
-
PhoneGap Build
- 15111 Conversations
- 275 Followers


