Skip to content

Commit

Permalink
Improve room/channel display in stream view
Browse files Browse the repository at this point in the history
  • Loading branch information
GladOSkar committed Dec 18, 2023
1 parent aeb633c commit c9d9f55
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions app/stream.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,16 @@ <h2>This makes us sad because we can't deliver our translations :(</h2>
var splitKey = window.location.href.split('channel=')
var fullChannel = splitKey.length > 1 ? splitKey[1].split('&')[0] : '[No channel]'
var path = fullChannel.split('/')
var room = path[0]
var room = path[1]
var roomtext = room.replace('_', ' ')
var lang = path[path.length-1]
lang = {
'english-german': 'English–German',
'third-language': 'Other Language',
'translation': 'English–German',
'translation-1': 'English–German',
'translation-2': 'Other Language',
}[lang] || lang
document.write('<h1>' + decodeURIComponent(room) + '</h1>')
document.write('<h2>' + decodeURIComponent(lang) + '</h2>')
var langtext = {
'l': 'Original',
'1': 'English–German',
'2': 'Other Language',
}[lang[lang.length-1]] || lang
document.write('<h1>' + decodeURIComponent(roomtext) + '</h1>')
document.write('<h2>' + decodeURIComponent(langtext) + '</h2>')
</script>

<script>
Expand Down

0 comments on commit c9d9f55

Please sign in to comment.