mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
Fixed bug with "block" mode
window and audio API were always blocked when using any of the "block ..." modes Fixes #243
This commit is contained in:
parent
e0729480fb
commit
aa8b202545
5 changed files with 12 additions and 10 deletions
|
@ -90,7 +90,7 @@
|
|||
const intCache = Object.create(null);
|
||||
|
||||
function fakeFloat32Array(array, window, prefs){
|
||||
if (prefs("protectAudio")){
|
||||
if (prefs("protectAudio", window.location)){
|
||||
let cached = false;
|
||||
let hash;
|
||||
if (prefs("useAudioCache")){
|
||||
|
@ -121,7 +121,7 @@
|
|||
}
|
||||
}
|
||||
function fakeUint8Array(array, window, prefs){
|
||||
if (prefs("protectAudio")){
|
||||
if (prefs("protectAudio", window.location)){
|
||||
let cached = false;
|
||||
let hash;
|
||||
if (prefs("useAudioCache")){
|
||||
|
@ -148,9 +148,9 @@
|
|||
randomSupply = supply;
|
||||
};
|
||||
|
||||
function getStatus(obj, status){
|
||||
function getStatus(obj, status, prefs){
|
||||
status = Object.create(status);
|
||||
status.active = hasType(status, "readout");
|
||||
status.active = prefs("protectAudio", status.url) && hasType(status, "readout");
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue