Coder Social home page Coder Social logo

reddragonwebdesign / adblock-filter-analyzer Goto Github PK

View Code? Open in Web Editor NEW
15.0 1.0 1.0 248 KB

AdBlock Filter Syntax code highlighter and partial validator. Colorizes and explains the syntax. Good for learning.

Home Page: https://www.reddragonwebdesign.com/projects/adblock-filter-analyzer/

JavaScript 82.03% Hack 13.78% CSS 4.19%
adblock ublock-origin javascript adblock-plus ublock adblocker adblock-list adblocking syntax-highlighter syntax-analysis

adblock-filter-analyzer's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

tueksta

adblock-filter-analyzer's Issues

richTextBox undo behavior is buggy

  1. paste good tests
  2. select all, paste bad tests over it
  3. add a space to a random word
  4. hit ctrl-z (undo). space is not deleted.
  5. hit ctrl-z a couple more times. the good tests text comes back, but appended to the end of the bad tests list

rich text cursor position

// window.getSelection()
// may need to use draftJS library
// check JQuery and Bootstrap for WYSIWYG editors

tooltips

// TODO: tooltips
// check for JQuery and Bootstrap tooltips

many /##/ style filters are parsing wrong

Not all of these, but most of them

/^https:\/\/([a-z]+\.)?sythe\.org\/\[=%#@$&!^].*[\w\W]{20,}/$image
/##/
/##^/
/@@/
/test$/
/#@#/
/#@#^/
/#?#/
/:style/
/##+js/
/#@#+js/

ok for lines to have space & tab at the end

! ok for lines to have whitespace at the end: space, tab
test.com  
worldofbitco.in##+js(set, adBlock, false) 

Will probably need to add this.syntax['whitespaceFront'] and this.syntax['whitespaceBack']

throw errors for things like double action operators, double ## #?#

! per ublock documentation
example.com##+js()

! can't have things twice
example.com##test#?#test:style(position: absolute !important;)
example.com#?#test##test:style(position: absolute !important;)
example.com##test:style(position: absolute !important;):style(position: absolute !important;)
example.com#?#test:style(position: absolute !important;):style(position: absolute !important;)
example.com##test#@#test
example.com##test#?#test
example.com#?#test##test

! action operators :style() and :remove() are not allowed to be applied in many cases
example.com##^.badstuff:style(position: absolute !important;)
example.com##^.badstuff:remove(position: absolute !important;)
example.com#@#^.badstuff:style(position: absolute !important;)
example.com#@#^.badstuff:remove(position: absolute !important;)
example.com#@#.badstuff:style(position: absolute !important;)
example.com#@#.badstuff:remove(position: absolute !important;)
tribunnews.com##+js(acis, Math, ='\x):style(position: absolute !important;)
test.com$websocket:style(position: absolute !important;)
audiofanzine.com#$#abort-on-property-read TextDecoder:style(position: absolute !important;)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.