P0lip

Untitled

Mar 22nd, 2015
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const contentModXHR = Class({
  2.   implements: [privacyMode, contentMod],
  3.   initialize(file, value = true, ...args){
  4.     this.file = `${value}file.js`;
  5.     this.value = value;
  6.     this.include = this.makeURIRules("*.wykop.pl");
  7.     this.include = this.makeURIRules("http://www.wykop.pl/ramka/*");
  8.   },
  9.  
  10.   makeURIRules: rules => Array.isArray(rules) ? rules.map(rule => new MatchPattern(rule)) : new MatchPattern(rules),
  11.  
  12.   matchURI(window) (!this.include || (Array.isArray(this.include) ? this.include.filter(rule => rule.test(window.url || window.location.href)).length > 0 : this.include.test(window.url || window.location.href))) && (!this.exclude || (Array.isArray(this.exclude) ? 0 === this.exclude.filter(rule => rule.test(window.url || window.location.href)).length : !this.exclude.test(window.url || window.location.href))),
  13.  
  14.  
  15.   get redState() ({
  16.     "16":  `./icons/${this.value}_red_16.png`,
  17.     "32":  `./icons/${this.value}_red_32.png`,
  18.     "36":  `./icons/${this.value}_red_36.png`,
  19.     "64":  `./icons/${this.value}_red_64.png`
  20.   })
  21. });
Advertisement
Add Comment
Please, Sign In to add comment