@@ -6,8 +6,6 @@ import PersistentSyncStorage from 'src/helpers/PersistentSyncStorage';
|
||||
|
||||
class ChatWatcher {
|
||||
|
||||
|
||||
|
||||
constructor() {
|
||||
this.watchChat = this.watchChat.bind(this);
|
||||
this._chatContainer = null;
|
||||
@@ -26,7 +24,6 @@ class ChatWatcher {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
getChatContainer() {
|
||||
// Parent of actual chat (children are messages)
|
||||
const checkForContainer = (res, rej) => {
|
||||
|
||||
@@ -12,13 +12,8 @@ class Message {
|
||||
this.parsedText = ''; // This should be fine since you can't edit/change messages
|
||||
|
||||
this.parseText();
|
||||
|
||||
|
||||
|
||||
// Set Defaults
|
||||
this.setDefaultSelections();
|
||||
|
||||
|
||||
|
||||
if(this.hasEmotes) {
|
||||
this.node.setAttribute('message-id', this.id);
|
||||
this.setHtml();
|
||||
@@ -107,16 +102,6 @@ class Message {
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
||||
// Welcome Banner
|
||||
var welcomBanner = document.querySelector("yt-live-chat-viewer-engagement-message-renderer");
|
||||
|
||||
// Set Hide Welcome Banner
|
||||
if (PersistentSyncStorage.data.options.hideWelcomBanner) {
|
||||
welcomBanner.classList.add("hideElement");
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
||||
// Checks for kappa and replaces emoji element with kappa
|
||||
if(PersistentSyncStorage.data.options.kappaFix) {
|
||||
|
||||
@@ -173,7 +158,6 @@ class Message {
|
||||
inputAreaLabel.innerText = "";
|
||||
});
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
||||
// Set Font Size
|
||||
@@ -250,6 +234,4 @@ class Message {
|
||||
|
||||
}// end Message
|
||||
|
||||
|
||||
|
||||
export default Message;
|
||||
@@ -3,7 +3,6 @@ import ChatScroller from "./ChatScroller";
|
||||
import ChatWatcher from "./ChatWatcher";
|
||||
import RouteWatcher from "./RouteWatcher";
|
||||
|
||||
|
||||
import {
|
||||
isLivestream, isYoutubeGaming,
|
||||
isYoutubeEmbed, isYoutubeVanilla,
|
||||
@@ -34,7 +33,6 @@ class Main {
|
||||
// chatframe id - chatframe
|
||||
// movieframe id - movie_player_fix
|
||||
// dono ticker id - ticker
|
||||
|
||||
// player-theater-container
|
||||
}
|
||||
|
||||
@@ -58,22 +56,17 @@ class Main {
|
||||
}
|
||||
}// end onRouteChange
|
||||
|
||||
init() {
|
||||
setDefaults() {
|
||||
|
||||
this.chatWatcher = new ChatWatcher();
|
||||
this.chatWatcher.init();
|
||||
this.chatScroller = new ChatScroller();
|
||||
this.chatScroller.init();
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
||||
setDefaults();
|
||||
console.log("INIT");
|
||||
// Welcome Banner
|
||||
var welcomBanner = document.querySelector("yt-live-chat-viewer-engagement-message-renderer");
|
||||
|
||||
}// end init
|
||||
|
||||
}// end main
|
||||
|
||||
|
||||
function setDefaults() {
|
||||
// Set Hide Welcome Banner
|
||||
if (PersistentSyncStorage.data.options.hideWelcomBanner) {
|
||||
welcomBanner.classList.add("hideElement");
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -85,15 +78,26 @@ class Main {
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
||||
}
|
||||
|
||||
init() {
|
||||
|
||||
this.chatWatcher = new ChatWatcher();
|
||||
this.chatWatcher.init();
|
||||
this.chatScroller = new ChatScroller();
|
||||
this.chatScroller.init();
|
||||
|
||||
this.setDefaults();
|
||||
console.log("INIT");
|
||||
|
||||
}// end init
|
||||
}// end main
|
||||
|
||||
// --- Every Frame Loaded
|
||||
PersistentSyncStorage.on("ready", () => {
|
||||
MAIN = new Main();
|
||||
});
|
||||
|
||||
|
||||
function checkMode(){
|
||||
|
||||
if(alreadyTheater){
|
||||
@@ -120,7 +124,6 @@ function enterTheaterMode() {
|
||||
|
||||
const masthead_container = document.getElementById('masthead-container');
|
||||
|
||||
|
||||
masthead_container.hidden = true;
|
||||
|
||||
theater_wrapper.classList.add('theater_wrapper_fix');
|
||||
@@ -128,7 +131,6 @@ function enterTheaterMode() {
|
||||
chat_frame.classList.add('chat_frame_fix');
|
||||
info_frame.classList.add('info_contents_fix');
|
||||
|
||||
|
||||
theater_wrapper.append(info_frame);
|
||||
theater_wrapper.append(movie_player);
|
||||
theater_wrapper.append(chat_frame);
|
||||
@@ -152,7 +154,6 @@ function exitTheaterMode(){
|
||||
|
||||
const masthead_container = document.getElementById('masthead-container');
|
||||
|
||||
|
||||
masthead_container.hidden = false;
|
||||
|
||||
theater_wrapper.classList.remove('theater_wrapper_fix');
|
||||
@@ -174,7 +175,6 @@ function theaterMode(){
|
||||
|
||||
if(theaterButton){
|
||||
|
||||
|
||||
if(document.getElementById('player-theater-container').contains(document.getElementById('player-container'))){
|
||||
|
||||
// for when page loads first time - check is reversed after this
|
||||
|
||||
Reference in New Issue
Block a user