| 71 | }); |
| 72 | } |
| 73 | function parseUrl(url) { |
| 74 | var finalUrl = url; |
| 75 | if (finalUrl.startsWith("/")) { |
| 76 | var basePart = window.location.hostname + (window.location.port ? ":" + window.location.port : ""); |
| 77 | if (window.location.protocol === "https:") { |
| 78 | finalUrl = "wss://" + basePart + finalUrl; |
| 79 | } else if (window.location.protocol === "http:") { |
| 80 | finalUrl = "ws://" + basePart + finalUrl; |
| 81 | } |
| 82 | } |
| 83 | return finalUrl; |
| 84 | } |
| 85 | var PROXY_BLACKLIST = ["then", "catch", "length", "toJSON"]; |
| 86 | var SocketFeature = class _SocketFeature extends Feature { |
| 87 | static keyword = "socket"; |