sogebot / sogeBot

sogeBot - Free Twitch Bot built on Node.js
https://sogebot.xyz/
GNU General Public License v3.0
287 stars 65 forks source link

overlay: Add if game filters to swap depending on selected game #948

Closed sogehige closed 6 years ago

sogehige commented 6 years ago

Expected behavior

Actual behavior

Steps to reproduce

Additional informations

sogehige commented 6 years ago

This can be already done like for text overlay

<script type="text/javascript">
if ("$game" === "PLAYERUNKNOWN'S BATTLEGROUNDS") {
$('#text').html(`
<span style="font-family: 'PT Sans Narrow'; font-size: 1.5em; float: right; margin: 1.5em">
<div style="display: inline-block; background-color: rgba(25,25,25,0.7); color: rgb(250,250,250); font-weight: bold; padding: 1px 5px 1px 5px;">$_wins</div>
<div style="display: inline-block; background-color: rgb(250,250,250); color: rgb(80,80,80); padding: 1px 5px 1px 5px; font-weight: bold; margin-left:-5px;">VYHRY</div>

<div style="display: inline-block; background-color: rgba(25,25,25,0.7); color: rgb(250,250,250); font-weight: bold; padding: 1px 5px 1px 5px;">$_3</div>
<div style="display: inline-block; ; background-color: rgb(250,250,250); color: rgb(80,80,80); padding: 1px 5px 1px 5px; font-weight: bold; margin-left:-5px;">TOP 3</div>

<div style="display: inline-block; background-color: rgba(25,25,25,0.7); color: rgb(250,250,250); font-weight: bold; padding: 1px 5px 1px 5px;">$_10</div>
<div style="display: inline-block; ; background-color: rgb(250,250,250); color: rgb(80,80,80); padding: 1px 5px 1px 5px; font-weight: bold; margin-left:-5px;">TOP 10</div>
</span>`
)
} else {
 // no game
$('#text').html('')
}
</script>