mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Compile coffee files and remove them
With, ./node_modules/.bin/coffee -b -c Cakefile `find . -path ./node_modules -prune -o -name '*.coffee'`
This commit is contained in:
parent
82562fb21d
commit
31ad9566e6
38 changed files with 2277 additions and 1725 deletions
34
proxy/shims.js
Normal file
34
proxy/shims.js
Normal file
|
@ -0,0 +1,34 @@
|
|||
// Generated by CoffeeScript 2.4.1
|
||||
/*
|
||||
WebRTC shims for multiple browsers.
|
||||
*/
|
||||
var IceCandidate, PeerConnection, SessionDescription, WebSocket, XMLHttpRequest, chrome, document, location, webrtc, window;
|
||||
|
||||
if (typeof module !== "undefined" && module !== null ? module.exports : void 0) {
|
||||
window = {};
|
||||
document = {
|
||||
getElementById: function() {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
chrome = {};
|
||||
location = '';
|
||||
if ((typeof TESTING === "undefined" || TESTING === null) || !TESTING) {
|
||||
webrtc = require('wrtc');
|
||||
PeerConnection = webrtc.RTCPeerConnection;
|
||||
IceCandidate = webrtc.RTCIceCandidate;
|
||||
SessionDescription = webrtc.RTCSessionDescription;
|
||||
WebSocket = require('ws');
|
||||
({XMLHttpRequest} = require('xmlhttprequest'));
|
||||
}
|
||||
} else {
|
||||
window = this;
|
||||
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;
|
||||
WebSocket = window.WebSocket;
|
||||
XMLHttpRequest = window.XMLHttpRequest;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue