完善ue
This commit is contained in:
23
index.html
23
index.html
@ -212,5 +212,28 @@
|
||||
<script src="/webrtc/jquery-1.12.2.min.js"></script>
|
||||
<script src="/sdk/YJEarth.min.js"></script>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
<script>
|
||||
// 调用ue必要的设置,需要一起复制
|
||||
'object' != typeof ue || 'object' != typeof ue.interface
|
||||
? ('object' != typeof ue && (ue = {}),
|
||||
(ue.interface = {}),
|
||||
(ue.interface.broadcast = function (e, t) {
|
||||
if ('string' == typeof e) {
|
||||
var o = [e, ''];
|
||||
void 0 !== t && (o[1] = t);
|
||||
var n = encodeURIComponent(JSON.stringify(o));
|
||||
'object' == typeof history && 'function' == typeof history.pushState
|
||||
? (history.pushState({}, '', '#' + n), history.pushState({}, '', '#' + encodeURIComponent('[]')))
|
||||
: ((document.location.hash = n), (document.location.hash = encodeURIComponent('[]')));
|
||||
}
|
||||
}))
|
||||
: (function (e) {
|
||||
(ue.interface = {}),
|
||||
(ue.interface.broadcast = function (t, o) {
|
||||
'string' == typeof t && (void 0 !== o ? e.broadcast(t, JSON.stringify(o)) : e.broadcast(t, ''));
|
||||
});
|
||||
})(ue.interface),
|
||||
(ue5 = ue.interface.broadcast);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user