Removes guest parameter when navigating to close page.

Using sessionStorage to save whether user is guest or not.
This commit is contained in:
damencho 2017-01-03 14:15:32 -06:00
parent c46772015b
commit 4ebefb17e9
4 changed files with 7 additions and 9 deletions

View File

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

View File

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

View File

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

View File

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