Add fix for emote data and load custom css

This commit is contained in:
Zack Rauen 2017-11-09 08:18:24 -05:00
parent 988af4f433
commit cb733f50e0
3 changed files with 8 additions and 5 deletions

View File

@ -266,7 +266,7 @@ Core.prototype.initSettings = function () {
this.saveSettings();
} else {
this.loadSettings();
$('<style id="customcss">').html(window.bdStorage.get("bdcustomcss")).appendTo(document.head);
for (var setting in defaultCookie) {
if (settingsCookie[setting] == undefined) {
settingsCookie[setting] = defaultCookie[setting];
@ -324,14 +324,17 @@ Core.prototype.initObserver = function () {
}
// onSwitch()
// Not a channel, but still a switch (Activity Feed/Friends menu)
// Not a channel, but still a switch (Activity Feed/Friends menu/NSFW check)
if (node.classList.contains("activityFeed-HeiGwL") || node.id === "friends") {
pluginModule.channelSwitch();
}
if (node.classList.contains(".nsfw-1APjPl") || (node.querySelector(".nsfw-1APjPl") && node.classList.contains("")))
// onSwitch()
// New Channel
if (node.classList.contains("messages-wrapper")) {
if (node.classList.contains("messages-wrapper") || node.querySelector(".messages-wrapper")) {
console.log(node);
self.inject24Hour(node);
self.injectColoredText(node);
pluginModule.channelSwitch();

2
js/main.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -841,7 +841,7 @@ function parseEmoteData(extData, data) {
break;
case 1: //Twitch Subscriber Emotes
returnData = {};
if(!testJSON(extData, data)) {
if(!testJSON(extData, data) || !data || !Object.keys(data)) {
return null;
}