Ver código fonte

Removes guest parameter when navigating to close page.

Using sessionStorage to save whether user is guest or not.
j8
damencho 9 anos atrás
pai
commit
4ebefb17e9
4 arquivos alterados com 7 adições e 9 exclusões
  1. 0
    1
      close.html
  2. 2
    3
      close.js
  3. 0
    1
      close2.html
  4. 5
    4
      conference.js

+ 0
- 1
close.html Ver arquivo

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

+ 2
- 3
close.js Ver arquivo

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

+ 0
- 1
close2.html Ver arquivo

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

+ 5
- 4
conference.js Ver arquivo

195
 function maybeRedirectToWelcomePage(options) {
195
 function maybeRedirectToWelcomePage(options) {
196
     // if close page is enabled redirect to it, without further action
196
     // if close page is enabled redirect to it, without further action
197
     if (config.enableClosePage) {
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
         if (options.feedbackSubmitted)
201
         if (options.feedbackSubmitted)
199
-            window.location.pathname = "close.html?guest="
200
-                + APP.tokenData.isGuest;
202
+            window.location.pathname = "close.html";
201
         else
203
         else
202
-            window.location.pathname = "close2.html?guest="
203
-                + APP.tokenData.isGuest;
204
+            window.location.pathname = "close2.html";
204
         return;
205
         return;
205
     }
206
     }
206
 
207
 

Carregando…
Cancelar
Salvar