Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable Offline/Online Detection #173

Merged
merged 2 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
disable online/offline events, ensure navigator.onLine is always true
bump to 3.8.2
  • Loading branch information
ikreymer committed Sep 18, 2024
commit b7d2f0be5eefdcd378d9ef5b127ad7bf5329bc1f
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.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 @@
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
Loading