浏览代码

Removes guest parameter when navigating to close page.

Using sessionStorage to save whether user is guest or not.
master
damencho 8 年前
父节点
当前提交
4ebefb17e9
共有 4 个文件被更改,包括 7 次插入9 次删除
  1. 0
    1
      close.html
  2. 2
    3
      close.js
  3. 0
    1
      close2.html
  4. 5
    4
      conference.js

+ 0
- 1
close.html 查看文件

@@ -3,7 +3,6 @@
3 3
     <link rel="stylesheet" href="css/all.css"/>
4 4
     <!--#include virtual="title.html" -->
5 5
     <script><!--#include virtual="/interface_config.js" --></script>
6
-    <script src="utils.js?v=1"></script>
7 6
     <script src="close.js"></script>
8 7
 </head>
9 8
 <body>

+ 2
- 3
close.js 查看文件

@@ -1,4 +1,4 @@
1
-/* global interfaceConfig, getConfigParamsFromUrl */
1
+/* global interfaceConfig */
2 2
 //list of tips
3 3
 var hints = [
4 4
     "You can pin participants by clicking on their thumbnails.",// jshint ignore:line
@@ -45,8 +45,7 @@ function onLoad() {
45 45
 
46 46
     // If there is a setting show a special message only for the guests
47 47
     if (interfaceConfig.CLOSE_PAGE_GUEST_HINT) {
48
-        let params = getConfigParamsFromUrl('search');
49
-        if ( params.guest ) {
48
+        if ( window.sessionStorage.getItem('guest') === 'true' ) {
50 49
             var element = document.getElementById('hintQuestion');
51 50
             element.classList.add('hide');
52 51
             insertTextMsg('hintMessage', interfaceConfig.CLOSE_PAGE_GUEST_HINT);

+ 0
- 1
close2.html 查看文件

@@ -3,7 +3,6 @@
3 3
     <link rel="stylesheet" href="css/all.css"/>
4 4
     <!--#include virtual="title.html" -->
5 5
     <script><!--#include virtual="/interface_config.js" --></script>
6
-    <script src="utils.js?v=1"></script>
7 6
     <script src="close.js"></script>
8 7
 </head>
9 8
 <body>

+ 5
- 4
conference.js 查看文件

@@ -195,12 +195,13 @@ function muteLocalVideo (muted) {
195 195
 function maybeRedirectToWelcomePage(options) {
196 196
     // if close page is enabled redirect to it, without further action
197 197
     if (config.enableClosePage) {
198
+        // save whether current user is guest or not, before navigating
199
+        // to close page
200
+        window.sessionStorage.setItem('guest', APP.tokenData.isGuest);
198 201
         if (options.feedbackSubmitted)
199
-            window.location.pathname = "close.html?guest="
200
-                + APP.tokenData.isGuest;
202
+            window.location.pathname = "close.html";
201 203
         else
202
-            window.location.pathname = "close2.html?guest="
203
-                + APP.tokenData.isGuest;
204
+            window.location.pathname = "close2.html";
204 205
         return;
205 206
     }
206 207
 

正在加载...
取消
保存