Skip to content
This repository has been archived by the owner on Nov 30, 2020. It is now read-only.

Support Twitch's Dark Chat Option #33

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Support Twitch's Dark Chat Option #33

wants to merge 2 commits into from

Conversation

SirStendec
Copy link

This adds a method to fetch Ember's settings from localStorage, which contains flags for showing timestamps and dark-mode chat. If darkMode is true, it should add the dark class to the chat-container.

…e setting. This could also be used to toggle timestamps.
@@ -26,6 +26,16 @@ this.ReChat = $.extend({
}
}, this.ReChat || {});

ReChat.EmberSettings = function() {
if ( localStorage.hasOwnProperty('chatSettings') ) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accessing localStorage at all will throw an error in Safari Private Browsing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants