Skip to content

Commit 414d3f7

Browse files
committed
Update source code and doc for release 1.2.0
1 parent a4e5361 commit 414d3f7

15 files changed

+19
-10
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## [1.2.0] - 2022-06-26
4+
### Changed
5+
- Use label "source" instead of "wrapper" for gathered logs
6+
7+
### Removed
8+
- Remove support for messageerror listener
9+
10+
311
## [1.1.0] - 2022-05-25
412
### Added
513
- Include feature for disabling Content-Security-Policy (CSP)

docs/browserwatcher.epub

-141 KB
Binary file not shown.

docs/browserwatcher.pdf

-140 KB
Binary file not shown.
-67.4 KB
Binary file not shown.
74.9 KB
Loading
-78.5 KB
Binary file not shown.
89.4 KB
Loading

docs/index.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@
775775
<h1>BrowserWatcher</h1>
776776
<div class="details">
777777
<span id="author" class="author">Boni García</span><br>
778-
<span id="revdate">Version 1.1.0</span>
778+
<span id="revdate">Version 1.2.0</span>
779779
</div>
780780
<div id="toc" class="toc2">
781781
<div id="toctitle">Table of Contents</div>
@@ -901,10 +901,10 @@ <h2 id="setup"><a class="anchor" href="#setup"></a>2. Setup</h2>
901901
<div class="ulist">
902902
<ul>
903903
<li>
904-
<p><a href="https://github.com/bonigarcia/browserwatcher/releases/download/1.1.0/browserwatcher-1.1.0.crx">browserwatcher-1.1.0.crx</a>: Chrome Extension (CRX), for Chromium-based browsers, such as Chrome or Edge. To install it, you can drag and drop this file into the extensions page (<em>chrome://extensions/</em>).</p>
904+
<p><a href="https://github.com/bonigarcia/browserwatcher/releases/download/1.2.0/browserwatcher-1.2.0.crx">browserwatcher-1.2.0.crx</a>: Chrome Extension (CRX), for Chromium-based browsers, such as Chrome or Edge. To install it, you can drag and drop this file into the extensions page (<em>chrome://extensions/</em>).</p>
905905
</li>
906906
<li>
907-
<p><a href="https://github.com/bonigarcia/browserwatcher/releases/download/1.1.0/browserwatcher-1.1.0.xpi">browserwatcher-1.1.0.xpi</a>: XPInstall (XPI), for Firefox. To install it, visit the <em>about:addons</em> page and click on <em>Install Add-on From File&#8230;&#8203;</em>.</p>
907+
<p><a href="https://github.com/bonigarcia/browserwatcher/releases/download/1.2.0/browserwatcher-1.2.0.xpi">browserwatcher-1.2.0.xpi</a>: XPInstall (XPI), for Firefox. To install it, visit the <em>about:addons</em> page and click on <em>Install Add-on From File&#8230;&#8203;</em>.</p>
908908
</li>
909909
</ul>
910910
</div>
@@ -928,7 +928,7 @@ <h2 id="features"><a class="anchor" href="#features"></a>3. Features</h2>
928928
<div class="sect2">
929929
<h3 id="console-log-gathering"><a class="anchor" href="#console-log-gathering"></a>3.1. Console Log Gathering</h3>
930930
<div class="paragraph">
931-
<p>BrowserWatcher allows gathering the browser console following a cross-browser approach. Internally, it uses a <em>monkey patching</em> technique to override the JavaScript object <code>console</code>. In particular, the following methods are overridden: <code>log</code>, <code>warn</code>, <code>error</code>, <code>info</code>, <code>dir</code>, <code>time</code>, <code>timeEnd</code>, <code>table</code>, and <code>count</code>. In addition, it implements several JavaScript listeners for the following events: <code>error</code> (JavaScript error trace), <code>unhandledrejection</code> (when a JavaScript <em>Promise</em> with no rejection handler is rejected), <code>messageerror</code> (when the <em>Window</em> object receives a message that cannot be deserialized), <code>securitypolicyviolation</code> (when the content security policy is violated), and <code>xhr-error</code> (error response from <code>XMLHttpRequest</code>). This way, the gathered logs are accessible in the property <code>_bwLogs</code> in the <code>console</code> object. The following picture shows an example of the gathered logs of a the <a href="https://bonigarcia.dev/selenium-webdriver-java/console-logs.html">sample page</a>:</p>
931+
<p>BrowserWatcher allows gathering the browser console following a cross-browser approach. Internally, it uses a <em>monkey patching</em> technique to override the JavaScript object <code>console</code>. In particular, the following methods are overridden: <code>log</code>, <code>warn</code>, <code>error</code>, <code>info</code>, <code>dir</code>, <code>time</code>, <code>timeEnd</code>, <code>table</code>, and <code>count</code>. In addition, it implements several JavaScript listeners for the following events: <code>error</code> (JavaScript error trace), <code>unhandledrejection</code> (when a JavaScript <em>Promise</em> with no rejection handler is rejected), <code>securitypolicyviolation</code> (when the content security policy is violated), and <code>xhr-error</code> (error response from <code>XMLHttpRequest</code>). This way, the gathered logs are accessible in the property <code>_bwLogs</code> in the <code>console</code> object. The following picture shows an example of the gathered logs of a the <a href="https://bonigarcia.dev/selenium-webdriver-java/console-logs.html">sample page</a>:</p>
932932
</div>
933933
<div id="gather-console-logs-example" class="imageblock thumb">
934934
<div class="content">
@@ -1117,7 +1117,7 @@ <h2 id="webdrivermanager"><a class="anchor" href="#webdrivermanager"></a>4. WebD
11171117

11181118
<span class="keyword">for</span> (<span class="predefined-type">Map</span>&lt;<span class="predefined-type">String</span>, <span class="predefined-type">Object</span>&gt; map : logMessages) {
11191119
log.debug(<span class="string"><span class="delimiter">&quot;</span><span class="content">[{}] [{}.{}] {}</span><span class="delimiter">&quot;</span></span>, map.get(<span class="string"><span class="delimiter">&quot;</span><span class="content">datetime</span><span class="delimiter">&quot;</span></span>),
1120-
map.get(<span class="string"><span class="delimiter">&quot;</span><span class="content">wrapper</span><span class="delimiter">&quot;</span></span>).toString().toUpperCase(),
1120+
map.get(<span class="string"><span class="delimiter">&quot;</span><span class="content">source</span><span class="delimiter">&quot;</span></span>).toString().toUpperCase(),
11211121
<span class="predefined-type">String</span>.format(<span class="string"><span class="delimiter">&quot;</span><span class="content">%1$-7s</span><span class="delimiter">&quot;</span></span>,
11221122
map.get(<span class="string"><span class="delimiter">&quot;</span><span class="content">type</span><span class="delimiter">&quot;</span></span>).toString().toUpperCase()),
11231123
map.get(<span class="string"><span class="delimiter">&quot;</span><span class="content">message</span><span class="delimiter">&quot;</span></span>));
@@ -1191,8 +1191,8 @@ <h2 id="about"><a class="anchor" href="#about"></a>6. About</h2>
11911191
</div>
11921192
<div id="footer">
11931193
<div id="footer-text">
1194-
Version 1.1.0<br>
1195-
Updated on 24-05-2022
1194+
Version 1.2.0<br>
1195+
Updated on 26-06-2022
11961196
</div>
11971197
</div>
11981198
</body>

ext/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"description": "Browser extension for monitoring console logging, tab recording, CSP disabling, and JavaScript and CSS injection",
33
"manifest_version": 2,
44
"name": "BrowserWatcher",
5-
"version": "1.1.0",
5+
"version": "1.2.0",
66
"homepage_url": "https://github.com/bonigarcia/browserwatcher",
77
"icons": {
88
"80": "img/browserwatcher-80.png"

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>io.github.bonigarcia</groupId>
77
<artifactId>browserwatcher</artifactId>
8-
<version>1.1.0</version>
8+
<version>1.2.0</version>
99

1010
<parent>
1111
<groupId>org.springframework.boot</groupId>

0 commit comments

Comments
 (0)