mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Not removing toasts anymore until materializecss fixes issue that comes with it
This commit is contained in:
@@ -879,16 +879,19 @@ function before_toast(){
|
||||
var toastInstance = toastElement.M_Toast;
|
||||
toastInstance.remove();
|
||||
}*/
|
||||
var toasts = document.querySelectorAll(".toast");
|
||||
for(var i = 0; i < toasts.length; i++) {
|
||||
var instance = M.Toast.getInstance(toasts[i]);
|
||||
/*var toasts = document.querySelector(".toast");
|
||||
//for(var i = 0; i < toasts.length; i++) {
|
||||
// var instance = M.Toast.getInstance(toasts[i]);
|
||||
if(toasts == null) return;
|
||||
var instance = M.Toast.getInstance(toasts);
|
||||
try {
|
||||
if(instance.timeRemaining > 10) {
|
||||
console.log(instance);
|
||||
if(instance.timeRemaining > 0) {
|
||||
instance.dismiss();
|
||||
}
|
||||
} catch(e) {
|
||||
}
|
||||
}
|
||||
//}*/
|
||||
//M.Toast.dismissAll();
|
||||
//Materialize.Toast.removeAll();
|
||||
}
|
||||
|
||||
@@ -227,7 +227,12 @@ window.addEventListener("DOMContentLoaded", function() {
|
||||
$(".connect_error").remove();
|
||||
M.toast({ html: "Connected!", displayLength: 2000, classes: "green lighten"});
|
||||
});*/
|
||||
before_toast();
|
||||
var to_remove = document.querySelector(".connect_error");
|
||||
if(to_remove != null) {
|
||||
var instance = M.Toast.getInstance(to_remove);
|
||||
instancce.dismiss();
|
||||
}
|
||||
//before_toast();
|
||||
}
|
||||
Chat.namechange("", true, true);
|
||||
});
|
||||
@@ -1532,13 +1537,13 @@ addListener("click", "#close_find_form_button", function(event) {
|
||||
|
||||
addListener("submit", "#find_form", function(event){
|
||||
this.preventDefault();
|
||||
if(this.find_value.value != find_word) {
|
||||
find_word = this.find_value.value;
|
||||
if(this.target.find_value.value != find_word) {
|
||||
find_word = this.target.find_value.value;
|
||||
found_array = [];
|
||||
found_array_index = 0;
|
||||
}
|
||||
if(found_array.length == 0){
|
||||
var that = this;
|
||||
var that = this.target;
|
||||
found_array_index = 0;
|
||||
found_array = [];
|
||||
for(var i = 0; i < full_playlist.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user