1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-03 02:37:21 +02:00

window.open-defuser.js logging feature

gwarser 2020-04-28 19:00:58 +02:00
parent f61c10911e
commit fe239d5b1b

@ -463,14 +463,16 @@ Prevent opening new windows by [_`window.open()`_](https://developer.mozilla.org
`nowoif.js` alias available in [1.26.3b12](https://github.com/gorhill/uBlock/commit/6259f88598b2d3e044679d6fe0fdb6eb16f6c479).
Improved in [1.25.3b1](https://github.com/gorhill/uBlock/commit/b27848a060eee961e2403192097448467b3bc7b5):
Improved in [1.25.3b1](https://github.com/gorhill/uBlock/commit/b27848a060eee961e2403192097448467b3bc7b5), [b2](https://github.com/gorhill/uBlock/commit/0f33f2386d147e4930b402a07418da670524e43f):
If second argument is present and a valid integer value, the defuser will return a valid window object even though no popup window is opened. The returned window object will cease to be valid after the specified number of seconds. If not present, no window will be opened and the scriptlet will return `null`.
Use third parameter (set it to `-` for example) to log `window.open()` parameters, and log access to attributes of returned `window` object.
Parameters:
- optional, string/_regular expression_, prefixed by `!` for negation, matching in URL parameter passed to _`window.open()`_,
- optional, positive decimal integer, number of seconds after returned `window` object will be invalidated.
- optional, unspecified, set it to something, for ex. `-` to enable logging
Parameters syntax deprecated after 1.25.3b1:
- optional - defaults to "matching", nothing or `1` for "matching", `0` for "not matching",