From fe239d5b1b6a42cd466de4ae3c2391ca0604e0d7 Mon Sep 17 00:00:00 2001 From: gwarser Date: Tue, 28 Apr 2020 19:00:58 +0200 Subject: [PATCH] window.open-defuser.js logging feature --- Resources-Library.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Resources-Library.md b/Resources-Library.md index ef3f10e..bc85ab6 100644 --- a/Resources-Library.md +++ b/Resources-Library.md @@ -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",