Compare commits
No commits in common. "5fb2609d623ef492b434389b71958f5ca3f4c3b0" and "315c5340f3dc5f5b24fcc143883c0934654649a8" have entirely different histories.
5fb2609d62
...
315c5340f3
6 changed files with 19 additions and 40 deletions
|
|
@ -111,10 +111,6 @@ div.interactive:active{
|
|||
background-color: var(--bg1);
|
||||
}
|
||||
|
||||
:not(button) > i{
|
||||
color: var(--accent0-alt1);
|
||||
}
|
||||
|
||||
button i{
|
||||
margin: 0.05em;
|
||||
text-wrap: nowrap;
|
||||
|
|
@ -127,8 +123,6 @@ select{
|
|||
border: none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
button{
|
||||
background-color: var(--bg0);
|
||||
color: var(--accent0);
|
||||
|
|
@ -159,8 +153,6 @@ input:checked{
|
|||
}
|
||||
|
||||
input:not([type='checkbox']):not(.navbar-item), textarea {
|
||||
background-color: var(--bg2);
|
||||
color: var(--accent0);
|
||||
border-radius: 1em;
|
||||
border: none;
|
||||
padding: 0.1em 0.5em;
|
||||
|
|
|
|||
|
|
@ -251,6 +251,7 @@ class channel{
|
|||
|
||||
//If we're playing a video from Internet Archive
|
||||
if(nowPlaying != null && nowPlaying.type == 'ia'){
|
||||
console.log("RELOAD");
|
||||
//Hard reload the media, forcing media handler re-creation
|
||||
this.player.hardReload();
|
||||
}
|
||||
|
|
@ -318,6 +319,9 @@ class channel{
|
|||
return;
|
||||
}
|
||||
|
||||
console.log(value);
|
||||
console.log((value == true || value == "true") ? "none" : "unset");
|
||||
|
||||
//Convert string to bool and use it to set visibility of send button
|
||||
this.chatBox.sendButton.style.display = (value == true || value == "true") ? "none" : "unset";
|
||||
return;
|
||||
|
|
@ -357,7 +361,7 @@ class channel{
|
|||
["chatWidthMin", 20],
|
||||
["disablePortrait", false],
|
||||
["disableSendButton", false],
|
||||
["userlistHidden", true],
|
||||
["userlistHidden", false],
|
||||
["cinemaMode", false],
|
||||
["rxPMSound", 'unread'],
|
||||
["txPMSound", false],
|
||||
|
|
|
|||
|
|
@ -406,9 +406,6 @@ class poppedPanel{
|
|||
* Fills container window with Popped Panel container elements
|
||||
*/
|
||||
fillContainer(){
|
||||
//Apply theme
|
||||
this.window.document.head.appendChild(ThemeManager.genThemeLink());
|
||||
|
||||
//Set Element Nodes
|
||||
this.panelDiv = this.window.document.querySelector("#cpanel-div");
|
||||
this.panelTitle = this.window.document.querySelector("#cpanel-title");
|
||||
|
|
|
|||
|
|
@ -111,16 +111,6 @@ class settingsPanel extends panelObj{
|
|||
}
|
||||
|
||||
fillThemes(){
|
||||
//Find theme selector
|
||||
const selector = this.theme.querySelector('select');
|
||||
|
||||
//If the theme selector has already been filled or doesnt exist
|
||||
if(selector == null || selector.childElementCount > 0){
|
||||
//Stop while we're ahead
|
||||
return;
|
||||
}
|
||||
|
||||
//For each theme
|
||||
for(let themeName of ThemeManager.themes.keys()){
|
||||
//Create theme option
|
||||
let option = document.createElement('option');
|
||||
|
|
@ -130,7 +120,7 @@ class settingsPanel extends panelObj{
|
|||
option.innerText = themeName;
|
||||
|
||||
//Add option to theme selector
|
||||
selector.appendChild(option);
|
||||
this.theme.querySelector('select').appendChild(option);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -165,7 +155,6 @@ class settingsPanel extends panelObj{
|
|||
this.theme.querySelector('select').value = localStorage.getItem("theme");
|
||||
this.chatWidthMinimum.value = localStorage.getItem("chatWidthMin");
|
||||
this.disablePortrait.checked = localStorage.getItem("disablePortrait") == 'true';
|
||||
this.disableSendButton.checked = localStorage.getItem("disableSendButton") == 'true';
|
||||
this.rxPMSound.value = localStorage.getItem('rxPMSound');
|
||||
this.txPMSound.checked = localStorage.getItem('txPMSound') == 'true';
|
||||
this.newSeshSound.checked = localStorage.getItem('newSeshSound') == 'true';
|
||||
|
|
@ -290,6 +279,8 @@ class settingsPanel extends panelObj{
|
|||
* Handles change toggle of disable/enable send buttton
|
||||
*/
|
||||
updateDisableSendButton(){
|
||||
console.log(this.disableSendButton);
|
||||
console.log(this.disableSendButton.checked);
|
||||
localStorage.setItem('disableSendButton', this.disableSendButton.checked);
|
||||
client.processConfig("disableSendButton", this.disableSendButton.checked);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ class migratePrompt{
|
|||
//Add verification event listener to altcha widget
|
||||
this.altcha.addEventListener("verified", this.verify.bind(this));
|
||||
|
||||
console.log(this.button);
|
||||
|
||||
//Add migrate event listener to migrate button
|
||||
this.button.addEventListener("click", this.migrate.bind(this));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class themeManager{
|
|||
* Sets theme by name
|
||||
* @param {String} theme - name of theme to set, keep blank for default theme
|
||||
*/
|
||||
setTheme(theme = localStorage.getItem("theme")){
|
||||
setTheme(theme){
|
||||
//If we didnt get a theme to set
|
||||
if(theme == null){
|
||||
//Use the first theme in the list
|
||||
|
|
@ -63,7 +63,14 @@ class themeManager{
|
|||
}
|
||||
|
||||
//Create new link element and use it to set themeLink
|
||||
this.themeLink = this.genThemeLink(theme);
|
||||
this.themeLink = document.createElement('link');
|
||||
|
||||
//Set themeLink attributes
|
||||
this.themeLink.type = "text/css";
|
||||
this.themeLink.rel = "stylesheet";
|
||||
|
||||
//Set theme href to theme location
|
||||
this.themeLink.href = this.themes.get(theme);
|
||||
|
||||
//Append themeLink to header
|
||||
document.querySelector('head').appendChild(this.themeLink);
|
||||
|
|
@ -71,20 +78,6 @@ class themeManager{
|
|||
//Save theme choice to local storage
|
||||
localStorage.setItem("theme", theme);
|
||||
}
|
||||
|
||||
genThemeLink(theme = localStorage.getItem("theme")){
|
||||
//Create new link element and use it to set themeLink
|
||||
const themeLink = document.createElement('link');
|
||||
|
||||
//Set themeLink attributes
|
||||
themeLink.type = "text/css";
|
||||
themeLink.rel = "stylesheet";
|
||||
|
||||
//Set theme href to theme location
|
||||
themeLink.href = this.themes.get(theme);
|
||||
|
||||
return themeLink;
|
||||
}
|
||||
}
|
||||
|
||||
ThemeManager = new themeManager();
|
||||
Loading…
Add table
Add a link
Reference in a new issue