mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
Don't overwrite global location
This commit is contained in:
parent
3455cd5da8
commit
6e95581f53
2 changed files with 2 additions and 5 deletions
|
@ -13,7 +13,7 @@ var snowflake, query, debug, silenceNotifications, log, dbg, init;
|
|||
|
||||
snowflake = null;
|
||||
|
||||
query = Query.parse(location);
|
||||
query = Query.parse(location.search.substr(1));
|
||||
|
||||
debug = Params.getBool(query, 'debug', false);
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ if (typeof module !== "undefined" && module !== null ? module.exports : void 0)
|
|||
}
|
||||
};
|
||||
chrome = {};
|
||||
location = '';
|
||||
location = { search: '' };
|
||||
if ((typeof TESTING === "undefined" || TESTING === null) || !TESTING) {
|
||||
webrtc = require('wrtc');
|
||||
PeerConnection = webrtc.RTCPeerConnection;
|
||||
|
@ -20,9 +20,6 @@ if (typeof module !== "undefined" && module !== null ? module.exports : void 0)
|
|||
({ XMLHttpRequest } = require('xmlhttprequest'));
|
||||
}
|
||||
} else {
|
||||
document = window.document;
|
||||
chrome = window.chrome;
|
||||
location = window.location.search.substr(1);
|
||||
PeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
|
||||
IceCandidate = window.RTCIceCandidate || window.mozRTCIceCandidate;
|
||||
SessionDescription = window.RTCSessionDescription || window.mozRTCSessionDescription;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue