Skip to content

Instantly share code, notes, and snippets.

@brussell98
Last active February 20, 2017 18:46
Show Gist options
  • Save brussell98/bb774dcd2d618160f86a61fc8ac3955d to your computer and use it in GitHub Desktop.
Save brussell98/bb774dcd2d618160f86a61fc8ac3955d to your computer and use it in GitHub Desktop.
Listen.moe in Discord
(function() {
document.getElementsByClassName('channels-wrap')[0].children[0].insertAdjacentHTML('afterend', '<div class="listen-moe"><audio id="audio-player" controls><source src="https://listen.moe/stream" type="audio/mp3"></audio></div>');
document.getElementById('audio-player').addEventListener('play', function() { this.children[0].src = 'https://listen.moe/stream' });
document.getElementById('audio-player').addEventListener('pause', function() { this.children[0].src = '' });
})()
.listen-moe {
background-color: #333842;
}
.listen-moe audio {
margin-left: 2rem;
width: 270px;
}
.listen-moe audio::-webkit-media-controls-panel {
background-color: #333842;
}
.listen-moe audio::-webkit-media-controls-current-time-display {
display: none;
}
.listen-moe audio::-webkit-media-controls-timeline {
display: none;
}
.listen-moe audio::-webkit-media-controls-timeline-container {
display: none;
}
.listen-moe audio::-webkit-media-controls-time-remaining-display {
display: none;
}
.listen-moe
background-color: $background
audio
margin-left: 2rem
width: 270px
&::-webkit-media-controls-panel
background-color: $background
&::-webkit-media-controls-current-time-display
display: none
&::-webkit-media-controls-timeline
display: none
&::-webkit-media-controls-timeline-container
display: none
&::-webkit-media-controls-time-remaining-display
display: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment