How to use the matcher.defaultMatcher function in matcher

To help you get started, we’ve selected a few matcher 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 turnkeylinux / common / overlays / ninjux / home / user / .config / chromium / Default / Extensions / cfhdojbkjhnklbpkdaibdccddilifddb / 1.6.1_0 / background.js View on Github external
with(require("filterClasses"))
{
  this.Filter = Filter;
  this.RegExpFilter = RegExpFilter;
  this.BlockingFilter = BlockingFilter;
  this.WhitelistFilter = WhitelistFilter;
}
with(require("subscriptionClasses"))
{
  this.Subscription = Subscription;
  this.DownloadableSubscription = DownloadableSubscription;
}
var FilterStorage = require("filterStorage").FilterStorage;
var ElemHide = require("elemHide").ElemHide;
var defaultMatcher = require("matcher").defaultMatcher;
var Prefs = require("prefs").Prefs;
var Synchronizer = require("synchronizer").Synchronizer;
var Utils = require("utils").Utils;
var Notification = require("notification").Notification;

// Some types cannot be distinguished
RegExpFilter.typeMap.OBJECT_SUBREQUEST = RegExpFilter.typeMap.OBJECT;
RegExpFilter.typeMap.MEDIA = RegExpFilter.typeMap.FONT = RegExpFilter.typeMap.OTHER;

var isFirstRun = false;
var seenDataCorruption = false;
require("filterNotifier").FilterNotifier.addListener(function(action)
{
  if (action == "load")
  {
    importOldData();
github operasoftware / operaextensions.js / src / background / urlfilter / UrlFilterManager.js View on Github external
with(require("filterClasses")) {
    this.Filter = Filter;
    this.RegExpFilter = RegExpFilter;
    this.BlockingFilter = BlockingFilter;
    this.WhitelistFilter = WhitelistFilter;
  }

  with(require("subscriptionClasses")) {
    this.Subscription = Subscription;
    //this.DownloadableSubscription = DownloadableSubscription;
  }

  this.FilterStorage = require("filterStorage").FilterStorage;

  this.defaultMatcher = require("matcher").defaultMatcher;

  // https://github.com/adblockplus/adblockpluschrome/blob/master/webrequest.js

  var self = this;

  var frames = {};

  function recordFrame(tabId, frameId, parentFrameId, frameUrl) {
    if (!(tabId in frames))
      frames[tabId] = {};
    frames[tabId][frameId] = {url: frameUrl, parent: parentFrameId};
  }

  function getFrameData(tabId, frameId) {
    if (tabId in frames && frameId in frames[tabId])
      return frames[tabId][frameId];
github adblockplus / adblockpluschrome / background.js View on Github external
}
with(require("subscriptionClasses"))
{
  this.Subscription = Subscription;
  this.DownloadableSubscription = DownloadableSubscription;
  this.SpecialSubscription = SpecialSubscription;
}
with(require("whitelisting"))
{
  this.isWhitelisted = isWhitelisted;
  this.isFrameWhitelisted = isFrameWhitelisted;
  this.processKeyException = processKeyException;
}
var FilterStorage = require("filterStorage").FilterStorage;
var ElemHide = require("elemHide").ElemHide;
var defaultMatcher = require("matcher").defaultMatcher;
var Prefs = require("prefs").Prefs;
var Synchronizer = require("synchronizer").Synchronizer;
var Utils = require("utils").Utils;
var Notification = require("notification").Notification;
var initAntiAdblockNotification = require("antiadblockInit").initAntiAdblockNotification;

// Some types cannot be distinguished
RegExpFilter.typeMap.OBJECT_SUBREQUEST = RegExpFilter.typeMap.OBJECT;
RegExpFilter.typeMap.MEDIA = RegExpFilter.typeMap.FONT = RegExpFilter.typeMap.OTHER;

// Chrome on Linux does not fully support chrome.notifications until version 35
// https://code.google.com/p/chromium/issues/detail?id=291485
var canUseChromeNotifications = require("info").platform == "chromium"
  && "notifications" in chrome
  && (navigator.platform.indexOf("Linux") == -1 || parseInt(require("info").applicationVersion) > 34);
github turnkeylinux / common / overlays / ninjux / home / user / .config / chromium / Default / Extensions / cfhdojbkjhnklbpkdaibdccddilifddb / 1.6.1_0 / utils.js View on Github external
var backgroundPage = chrome.extension.getBackgroundPage();
var require = backgroundPage.require;

var Synchronizer = require("synchronizer").Synchronizer;
var Utils = require("utils").Utils;
var Prefs = require("prefs").Prefs;
var FilterStorage = require("filterStorage").FilterStorage;
var FilterNotifier = require("filterNotifier").FilterNotifier;

var subscriptionClasses = require("subscriptionClasses");
var Subscription = subscriptionClasses.Subscription;
var DownloadableSubscription = subscriptionClasses.DownloadableSubscription;
var filterClasses = require("filterClasses");
var Filter = filterClasses.Filter;
var BlockingFilter = filterClasses.BlockingFilter;
var defaultMatcher = require("matcher").defaultMatcher;

/**
 * Shortcut for document.getElementById(id)
 */
function E(id)
{
  return document.getElementById(id);
}
github adblockplus / adblockpluschrome / lib / adblockplus.js View on Github external
require.scopes["filterListener"] = (function()
{
  var exports = {};
  var FilterStorage = require("filterStorage").FilterStorage;
  var FilterNotifier = require("filterNotifier").FilterNotifier;
  var ElemHide = require("elemHide").ElemHide;
  var defaultMatcher = require("matcher").defaultMatcher;
  var _tempVar19 = require("filterClasses");
  var ActiveFilter = _tempVar19.ActiveFilter;
  var RegExpFilter = _tempVar19.RegExpFilter;
  var ElemHideBase = _tempVar19.ElemHideBase;
  var Prefs = require("prefs").Prefs;
  var batchMode = false;
  var isDirty = 0;
  var FilterListener = exports.FilterListener =
  {
    get batchMode()
    {
      return batchMode;
    },
    set batchMode(value)
    {
      batchMode = value;
github turnkeylinux / common / overlays / ninjux / home / user / .config / chromium / Default / Extensions / cfhdojbkjhnklbpkdaibdccddilifddb / 1.6.1_0 / lib / adblockplus.js View on Github external
require.scopes["filterListener"] = (function()
{
  var exports = {};
  var FilterStorage = require("filterStorage").FilterStorage;
  var FilterNotifier = require("filterNotifier").FilterNotifier;
  var ElemHide = require("elemHide").ElemHide;
  var defaultMatcher = require("matcher").defaultMatcher;
  var _tempVar23 = require("filterClasses");
  var ActiveFilter = _tempVar23.ActiveFilter;
  var RegExpFilter = _tempVar23.RegExpFilter;
  var ElemHideBase = _tempVar23.ElemHideBase;
  var Prefs = require("prefs").Prefs;
  var batchMode = false;
  var isDirty = 0;
  var FilterListener = exports.FilterListener =
  {
    get batchMode()
    {
      return batchMode;
    },
    set batchMode(value)
    {
      batchMode = value;
github operasoftware / operaextensions.js / src / common / third_party / adblockplus / adblockplus.js View on Github external
require.scopes["filterListener"] = (function()
{
  var exports = {};
  var FilterStorage = require("filterStorage").FilterStorage;
  var FilterNotifier = require("filterNotifier").FilterNotifier;
  var ElemHide = require("elemHide").ElemHide;
  var defaultMatcher = require("matcher").defaultMatcher;
  var _tempVar19 = require("filterClasses");
  var ActiveFilter = _tempVar19.ActiveFilter;
  var RegExpFilter = _tempVar19.RegExpFilter;
  var ElemHideBase = _tempVar19.ElemHideBase;
  var Prefs = require("prefs").Prefs;
  var batchMode = false;
  var isDirty = 0;
  var FilterListener = exports.FilterListener =
  {
    get batchMode()
    {
      return batchMode;
    },
    set batchMode(value)
    {
      batchMode = value;