tweb-i2p/src/config/modes.ts

26 lines
785 B
TypeScript
Raw Normal View History

2021-04-08 17:52:31 +04:00
/*
* https://github.com/morethanwords/tweb
* Copyright (C) 2019-2021 Eduard Kuzmenko
* https://github.com/morethanwords/tweb/blob/master/LICENSE
*
* Originally from:
* https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE
*/
2021-02-13 19:32:10 +04:00
const Modes = {
test: location.search.indexOf('test=1') > 0/* || true */,
debug: location.search.indexOf('debug=1') > 0,
http: false, //location.search.indexOf('http=1') > 0,
ssl: true, // location.search.indexOf('ssl=1') > 0 || location.protocol === 'https:' && location.search.indexOf('ssl=0') === -1,
2021-03-05 19:22:22 +04:00
multipleConnections: true,
asServiceWorker: false
2021-02-13 19:32:10 +04:00
};
2021-03-05 19:22:22 +04:00
/// #if MTPROTO_SW
Modes.asServiceWorker = true;
/// #endif
2021-02-13 19:32:10 +04:00
export default Modes;