Skip to content

Commit

Permalink
add theme support
Browse files Browse the repository at this point in the history
  • Loading branch information
BarryCarlyon committed Jul 29, 2024
1 parent 070e6af commit 3ba9ecc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 5 additions & 0 deletions extension/panel/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ window.Twitch.ext.onContext((ctx) => {
console.log(ctx);
// don't master log coz SPAM
iterateObject(document.getElementById('onContext'), ctx);
if (ctx.theme == 'dark') {
document.body.classList.add('twitch_dark');
} else {
document.body.classList.remove('twitch_dark');
}
});
window.Twitch.ext.onError((err) => {
master_log('Read onError! Check console');
Expand Down
4 changes: 1 addition & 3 deletions extension/panel/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@ html, body, #content {
left: 0px;
right: 0px;
bottom: 0px;
font-size: 20px;
}
#content {
overflow: scroll;
}
body {

background: #EEEEEE;
color: #111111;

font-size: 20px;
font-size: 18px;
font-family: Verdana;
}
body.twitch_dark {
Expand Down

0 comments on commit 3ba9ecc

Please sign in to comment.