diff options
author | sualko <klaus@jsxc.org> | 2020-05-05 14:32:26 +0300 |
---|---|---|
committer | sualko <klaus@jsxc.org> | 2020-05-05 14:32:26 +0300 |
commit | 3a5567c73f2ff50a7c8bee84ed56198ebb6bec4a (patch) | |
tree | ca90d44018a454b2f0605e552d6a2a4b33a6b861 /ts | |
parent | 025fafa0f71f820353d8958154b5f208811a0d0a (diff) |
fix: disable jsxc on totp page
fix jsxc/jsxc#885
Diffstat (limited to 'ts')
-rw-r--r-- | ts/Bootstrap.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ts/Bootstrap.ts b/ts/Bootstrap.ts index cdbfc8c..a31432d 100644 --- a/ts/Bootstrap.ts +++ b/ts/Bootstrap.ts @@ -31,13 +31,17 @@ export default class Bootstrap { } private checkSpecialPage() { - if (/^(\/index.php)?\/s\//.test(location.pathname)) { + if (/^(\/index.php)?\/s\//.test(window.location.pathname)) { throw new Error(`Abort, because we dont want to start chat on public shares.`); } if (OC.generateUrl('login/flow') === window.location.pathname) { throw new Error(`Abort, because chat is not needed on flow login.`); } + + if (OC.generateUrl('login/challenge/totp') === window.location.pathname) { + throw new Error('Abort, because chat is not needed on totp page.'); + } } public start() { |