Skip to content

Checks if the specified url contains advertisements

License

Notifications You must be signed in to change notification settings

Inevio/contains-ads

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contains Ads

Checks if the specified url contains advertisements.

$ yarn add contains-ads
const { client, initialize, containsAds } = require('contains-ads');

initialize().then(() => {

  // Easylist is the used by default, but you can add custom rules.
  // Visit abp for more information (https://adblockplus.org/filters).
  client.parse('||blacklistwebsite.com')
  client.parse('@@||whitelistwebsite.com');
  
  containsAds('http://www.twitter.com');          // False
  containsAds('http://www.blabal.com&ad_type_');  // True
});
# Development commands -
$ yarn test     # Runs the tests
$ yarn build    # Parses the list of blocked sites
$ yarn update   # Updates the list of blocked sites

About

Checks if the specified url contains advertisements

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%