mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 23:11:29 -04:00
Remove Modernizr dependency
And inline its only use site.
This commit is contained in:
parent
25dac378ee
commit
f3254e3402
6 changed files with 7 additions and 27 deletions
|
@ -22,17 +22,15 @@ else
|
|||
window = this
|
||||
location = window.location.search.substr(1)
|
||||
|
||||
prop = Modernizr.prefixed 'RTCPeerConnection', window, false
|
||||
if not prop
|
||||
console.log 'webrtc feature not detected. shutting down'
|
||||
return
|
||||
|
||||
PeerConnection = window[prop]
|
||||
|
||||
### FIXME: push these upstream ###
|
||||
PeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection ||
|
||||
window.webkitRTCPeerConnection
|
||||
IceCandidate = window.RTCIceCandidate || window.mozRTCIceCandidate
|
||||
SessionDescription = window.RTCSessionDescription ||
|
||||
window.mozRTCSessionDescription
|
||||
|
||||
if typeof PeerConnection isnt 'function'
|
||||
console.log 'webrtc feature not detected. shutting down'
|
||||
return
|
||||
|
||||
WebSocket = window.WebSocket
|
||||
XMLHttpRequest = window.XMLHttpRequest
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue