spee.ch/public/assets/js/navBarFunctions.js

16 lines
559 B
JavaScript
Raw Normal View History

2017-10-11 01:51:07 +02:00
function toggleNavBarSelection (value) {
const selectedOption = value;
if (selectedOption === 'LOGOUT') {
// remove session cookies
clearUserCookies();
// send logout request to server
window.location.href = '/logout';
} else if (selectedOption === 'VIEW') {
// get channel info
const channelName = getCookie('CHANNEL_NAME');
const channelClaimId = getCookie('CHANNEL_LONG_ID');
2017-10-11 01:51:07 +02:00
// redirect to channel page
window.location.href = `/${channelName}:${channelClaimId}`;
}
2018-01-18 21:43:02 +01:00
}