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
@uBlock-user
Copy link

List out #Site-specific scriptlets..

@gwarser
Copy link
Author

gwarser commented Jun 14, 2018

@uBlock-user my idea was to drop these Object.defineProperty for specific pages - they are absolete and skip these site-specific-specific like google-analytics.com/ga.js. These fuckadblock-like should be listed.

Side note - notifications does not work here :(

@uBlock-user
Copy link

uBlock-user commented Jun 14, 2018

@gwarser Some site specific scriptlets are either redundant or useless as of today, so just don't bother adding them. Yeah github's still broken when it comes to notifications.

@gwarser
Copy link
Author

gwarser commented Jun 14, 2018

Hmmm, some scriptlets were designed to be injected by redirect filter... "site-specific-specific"?

@uBlock-user
Copy link

Mention them under redirectable scriptlets?, anyways, thanks for doing this.

@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