moving welcome banner change to index
remove extra lines moved welcome banner to index moved set defaults inside main of index
This commit is contained in:
@@ -6,8 +6,6 @@ import PersistentSyncStorage from 'src/helpers/PersistentSyncStorage';
|
|||||||
|
|
||||||
class ChatWatcher {
|
class ChatWatcher {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.watchChat = this.watchChat.bind(this);
|
this.watchChat = this.watchChat.bind(this);
|
||||||
this._chatContainer = null;
|
this._chatContainer = null;
|
||||||
@@ -26,7 +24,6 @@ class ChatWatcher {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
getChatContainer() {
|
getChatContainer() {
|
||||||
// Parent of actual chat (children are messages)
|
// Parent of actual chat (children are messages)
|
||||||
const checkForContainer = (res, rej) => {
|
const checkForContainer = (res, rej) => {
|
||||||
|
|||||||
@@ -102,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
|
// Checks for kappa and replaces emoji element with kappa
|
||||||
if(PersistentSyncStorage.data.options.kappaFix) {
|
if(PersistentSyncStorage.data.options.kappaFix) {
|
||||||
|
|
||||||
@@ -168,7 +158,6 @@ class Message {
|
|||||||
inputAreaLabel.innerText = "";
|
inputAreaLabel.innerText = "";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// Set Font Size
|
// Set Font Size
|
||||||
@@ -245,6 +234,4 @@ class Message {
|
|||||||
|
|
||||||
}// end Message
|
}// end Message
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default Message;
|
export default Message;
|
||||||
@@ -3,7 +3,6 @@ import ChatScroller from "./ChatScroller";
|
|||||||
import ChatWatcher from "./ChatWatcher";
|
import ChatWatcher from "./ChatWatcher";
|
||||||
import RouteWatcher from "./RouteWatcher";
|
import RouteWatcher from "./RouteWatcher";
|
||||||
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
isLivestream, isYoutubeGaming,
|
isLivestream, isYoutubeGaming,
|
||||||
isYoutubeEmbed, isYoutubeVanilla,
|
isYoutubeEmbed, isYoutubeVanilla,
|
||||||
@@ -34,7 +33,6 @@ class Main {
|
|||||||
// chatframe id - chatframe
|
// chatframe id - chatframe
|
||||||
// movieframe id - movie_player_fix
|
// movieframe id - movie_player_fix
|
||||||
// dono ticker id - ticker
|
// dono ticker id - ticker
|
||||||
|
|
||||||
// player-theater-container
|
// player-theater-container
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,22 +56,17 @@ class Main {
|
|||||||
}
|
}
|
||||||
}// end onRouteChange
|
}// end onRouteChange
|
||||||
|
|
||||||
init() {
|
setDefaults() {
|
||||||
|
|
||||||
this.chatWatcher = new ChatWatcher();
|
///////////////////////////////////////////////////////////////////
|
||||||
this.chatWatcher.init();
|
|
||||||
this.chatScroller = new ChatScroller();
|
|
||||||
this.chatScroller.init();
|
|
||||||
|
|
||||||
setDefaults();
|
// Welcome Banner
|
||||||
console.log("INIT");
|
var welcomBanner = document.querySelector("yt-live-chat-viewer-engagement-message-renderer");
|
||||||
|
|
||||||
}// end init
|
// Set Hide Welcome Banner
|
||||||
|
if (PersistentSyncStorage.data.options.hideWelcomBanner) {
|
||||||
}// end main
|
welcomBanner.classList.add("hideElement");
|
||||||
|
}
|
||||||
|
|
||||||
function setDefaults() {
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -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
|
// --- Every Frame Loaded
|
||||||
PersistentSyncStorage.on("ready", () => {
|
PersistentSyncStorage.on("ready", () => {
|
||||||
MAIN = new Main();
|
MAIN = new Main();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
function checkMode(){
|
function checkMode(){
|
||||||
|
|
||||||
if(alreadyTheater){
|
if(alreadyTheater){
|
||||||
@@ -120,7 +124,6 @@ function enterTheaterMode() {
|
|||||||
|
|
||||||
const masthead_container = document.getElementById('masthead-container');
|
const masthead_container = document.getElementById('masthead-container');
|
||||||
|
|
||||||
|
|
||||||
masthead_container.hidden = true;
|
masthead_container.hidden = true;
|
||||||
|
|
||||||
theater_wrapper.classList.add('theater_wrapper_fix');
|
theater_wrapper.classList.add('theater_wrapper_fix');
|
||||||
@@ -128,7 +131,6 @@ function enterTheaterMode() {
|
|||||||
chat_frame.classList.add('chat_frame_fix');
|
chat_frame.classList.add('chat_frame_fix');
|
||||||
info_frame.classList.add('info_contents_fix');
|
info_frame.classList.add('info_contents_fix');
|
||||||
|
|
||||||
|
|
||||||
theater_wrapper.append(info_frame);
|
theater_wrapper.append(info_frame);
|
||||||
theater_wrapper.append(movie_player);
|
theater_wrapper.append(movie_player);
|
||||||
theater_wrapper.append(chat_frame);
|
theater_wrapper.append(chat_frame);
|
||||||
@@ -152,7 +154,6 @@ function exitTheaterMode(){
|
|||||||
|
|
||||||
const masthead_container = document.getElementById('masthead-container');
|
const masthead_container = document.getElementById('masthead-container');
|
||||||
|
|
||||||
|
|
||||||
masthead_container.hidden = false;
|
masthead_container.hidden = false;
|
||||||
|
|
||||||
theater_wrapper.classList.remove('theater_wrapper_fix');
|
theater_wrapper.classList.remove('theater_wrapper_fix');
|
||||||
@@ -174,7 +175,6 @@ function theaterMode(){
|
|||||||
|
|
||||||
if(theaterButton){
|
if(theaterButton){
|
||||||
|
|
||||||
|
|
||||||
if(document.getElementById('player-theater-container').contains(document.getElementById('player-container'))){
|
if(document.getElementById('player-theater-container').contains(document.getElementById('player-container'))){
|
||||||
|
|
||||||
// for when page loads first time - check is reversed after this
|
// for when page loads first time - check is reversed after this
|
||||||
|
|||||||
Reference in New Issue
Block a user