Software And Applications

Block Ads on Chrome Android App


// Fetch all tabs in the current window
chrome.tabs.query({currentWindow: true}, function(tabs) {
// Loop through all tabs
for (var i = 0; i < tabs.length; i++) { // Check if the tab is displaying an ad if (tabs[i].url.includes("googleadservices") { // Identify the app associated with the ad var app = tabs[i].title.substring(tabs[i].title.indexOf("-")+1).trim(); // Store data about the app and the ad // e.g. app name, ad type, click-through rate, revenue generated } } });

This code snippet uses the Chrome API to query all tabs in the current window and checks if any of the tabs display an ad. If an ad is detected, the code extracts the app name associated with the ad and stores relevant data about the app and the ad. This data can be used to analyze and manage ads by app on the user's Chrome browser.

Tips for Blocking Pop-ups, Notifications, and Home Screen Ads on Chrome

  • Enable Chrome's built-in pop-up blocker:
    • Open Chrome
      Enable Chrome's built-in pop-up blocker:
Open Chrome
    • Tap the three dots in the top right corner
    • Select "Settings"
    • Tap "Site settings"
      Select "Settings"
Tap "Site settings"
    • Toggle the "Pop-ups and redirects" switch to the right to enable
      pop-ups-and-redirects.png" class="size-medium aligncenter" style="width: 50%; margin-top: 25px; margin-bottom: 25px;" alt="Tap "Site settings"
      Toggle the "Pop-ups and redirects" switch to the right to enable">
  • Block notifications:
    • Open Chrome
      Enable Chrome's built-in pop-up blocker:
Open Chrome
    • Tap the three dots in the top right corner
    • Select "Settings"
    • Tap "Site settings"
      Select "Settings"
Tap "Site settings"
    • Tap "Notifications"
    • Toggle the switch to the right to disable notifications for all websites or select specific websites to block
  • Remove unwanted home screen ads:
    • Long press on the ad you want to remove
    • Select "Remove"
    • If the option is not available, tap and hold the ad until you see the option to "App info"
    • Select "App info"
      If the option is not available, tap and hold the ad until you see the option to "App info"
Select "App info"
    • Tap "Force stop" to temporarily stop the app from running
    • Tap "Storage"
      Tap "Force stop" to temporarily stop the app from running
Tap "Storage"
    • Select "Clear data" and "Clear cache"
    • If the ad persists, consider uninstalling the app altogether
Was this article helpful?
YesNo