diff options
author | Mark H Weaver <mhw@netris.org> | 2023-09-27 00:53:30 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2023-09-27 14:34:35 -0400 |
commit | fa5c0b073214191e6996ba0b5bc8e61560ff822c (patch) | |
tree | 38e7133195616f4a4da6c8fe46ab2c77c5a6e9e2 /data/extensions/jsr@javascriptrestrictor/wrappingS-MCS.js | |
parent | d167f676a167b1392a4e29f14ddf25613468680b (diff) |
Update the JShelter extension to 0.15.2.
Diffstat (limited to 'data/extensions/jsr@javascriptrestrictor/wrappingS-MCS.js')
-rw-r--r-- | data/extensions/jsr@javascriptrestrictor/wrappingS-MCS.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/data/extensions/jsr@javascriptrestrictor/wrappingS-MCS.js b/data/extensions/jsr@javascriptrestrictor/wrappingS-MCS.js index bba9bd0..a475221 100644 --- a/data/extensions/jsr@javascriptrestrictor/wrappingS-MCS.js +++ b/data/extensions/jsr@javascriptrestrictor/wrappingS-MCS.js @@ -40,13 +40,12 @@ * * This wrapper operates with three levels of protection: * - * * (0) - return promise with suffled array + * * (0) - return promise with shuffled array * * (1) - return promise with shuffled array with additional 0-4 fake devices * * (2) - return empty promise * * The shuffling approach is inspired by the algorithms created by [Brave Software](https://brave.com) * available [here](https://github.com/brave/brave-core/blob/master/chromium_src/third_party/blink/renderer/modules/mediastream/media_devices.cc). - * */ /* @@ -71,10 +70,12 @@ /** * \brief create and return MediaDeviceInfo object by overlaying a native one with fake properties * - * \param browserEnum enum specifying browser 0 - Chrome 1 - Firefox + * \param device Device is any native MediaInfoDevice object (https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo) + * \param fd_prng Initialized PRNG to be deterministically used by the function */ function fakeDevice(device, fd_prng){ var kinds = ["videoinput", "audioinput", "audiooutput"]; + // browserEnum specifies the browser: 0 - Chrome 1 - Firefox let browserEnum = device.groupId.length == 44 ? 1 : 0; var deviceId = browserEnum == 1 ? randomString(43, browserEnum, fd_prng)+ "=" : ""; let fakeData = { |