update proxy code to support more types

This commit is contained in:
luke crouch
2020-11-12 10:26:48 -06:00
parent 63996ce416
commit a457c60f32
6 changed files with 21 additions and 70 deletions
+3 -3
View File
@@ -52,7 +52,7 @@ const Utils = {
// The only issue with this approach is that if (for some unknown reason) pregeneratedString is not saved, it will result in an infinite loop - but better than a privacy leak!
return getBogusProxy();
}
}
},
/**
* Escapes any occurances of &, ", <, > or / with XML entities.
@@ -167,6 +167,8 @@ const Utils = {
}
};
window.Utils = Utils;
// The following creates a fake (but convincing) constant Utils.DEFAULT_PROXY
Object.defineProperty(window.Utils, "DEFAULT_PROXY", {
value: Object.freeze({type: "direct"}),
@@ -176,5 +178,3 @@ Object.defineProperty(window.Utils, "DEFAULT_PROXY", {
// Setting configurable to false avoids deletion of Utils.DEFAULT_PROXY
configurable: false
});
window.Utils = Utils;