Skip to content

Instantly share code, notes, and snippets.

@gwarser
Last active June 23, 2018 16:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gwarser/d1aabf7b013a7f3ae80dfcf6fb843abf to your computer and use it in GitHub Desktop.
Save gwarser/d1aabf7b013a7f3ae80dfcf6fb843abf to your computer and use it in GitHub Desktop.
Draft of "resources.txt" database documentation https://github.com/uBlockOrigin/uBlock-issues/issues/67
@gwarser
Copy link
Author

gwarser commented Jun 21, 2018

For tomorrow - how is this working?

9anime.*##script:inject(set-constant.js, Math.random, trueFunc)
9anime.*##script:inject(set-constant.js, Object.defineProperty, noopFunc)

@uBlock-user
Copy link

Doesn't do anything on my end so if I disable it with 9anime.*#@#script:inject(set-constant.js, Math.random, trueFunc) makes no difference.

9anime.*##script:inject(set-constant.js, Object.defineProperty, noopFunc) for some reason started causing the tabunder script on 9anime to react, so I had to disable it.

@gwarser
Copy link
Author

gwarser commented Jun 22, 2018

There is no defined order for filters and set-constant.js relies on Object.defineProperty so second filter may defuse first one. There is 8 filters like this in uBlock filters.

@gwarser
Copy link
Author

gwarser commented Jun 22, 2018

Deprecated -> Obsolete ?

@gwarser
Copy link
Author

gwarser commented Jun 22, 2018

Heh, looks like "constant" in set-constant.js means you can set property to predefined (constant) value. It does not make property immutable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment