How to use the @cliqz/adblocker-content.autoRemoveScript function in @cliqz/adblocker-content

To help you get started, we’ve selected a few @cliqz/adblocker-content examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cliqz-oss / adblocker / packages / adblocker-puppeteer / adblocker.ts View on Github external
hostname,
      url,

      // DOM information
      classes,
      hrefs,
      ids,
    });

    // Abort if cosmetics are disabled
    if (active === true) {
      // Inject scripts
      for (let i = 0; i < scripts.length; i += 1) {
        frame
          .addScriptTag({
            content: autoRemoveScript(scripts[i]),
          })
          .catch(() => {
            // Ignore
          });
      }

      // Inject CSS
      if (styles.length !== 0) {
        frame
          .addStyleTag({
            content: styles,
          })
          .catch(() => {
            // Ignore
          });
      }

@cliqz/adblocker-content

Ghostery adblocker library (content-scripts helpers)

MPL-2.0
Latest version published 16 days ago

Package Health Score

84 / 100
Full package analysis

Similar packages