Skip to content

Commit

Permalink
disable online/offline events, ensure navigator.onLine is always true
Browse files Browse the repository at this point in the history
bump to 3.8.2
  • Loading branch information
ikreymer committed Sep 18, 2024
1 parent 1582d3e commit b7d2f0b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@webrecorder/wombat",
"version": "3.8.1",
"version": "3.8.2",
"main": "index.js",
"license": "AGPL-3.0-or-later",
"author": "Ilya Kreymer, Webrecorder Software",
Expand Down
4 changes: 3 additions & 1 deletion src/wombat.js
Original file line number Diff line number Diff line change
Expand Up @@ -5817,6 +5817,8 @@ Wombat.prototype.initPostMessageOverride = function($wbwindow) {
wombat.storage_listeners.add_or_get(listener, function() {
return wrapSameOriginEventListener(listener, obj);
});
} else if (type === 'online' || type === 'offline') {
// do nothing, don't allow these events
} else {
rwListener = listener;
}
Expand Down Expand Up @@ -6066,7 +6068,7 @@ Wombat.prototype.initMiscNavigatorOverrides = function() {
if (this.$wbwindow.navigator.sendBeacon) {
this.$wbwindow.navigator.sendBeacon = function() { return true; };
}

Object.defineProperty(navigator, "onLine", {value: true});

Check failure on line 6071 in src/wombat.js

View workflow job for this annotation

GitHub Actions / lint

Strings must use singlequote
if (this.$wbwindow.navigator.mediaDevices) {
this.$wbwindow.navigator.mediaDevices.setCaptureHandleConfig = function() {};
}
Expand Down

0 comments on commit b7d2f0b

Please sign in to comment.