• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Changes

Jump to navigation Jump to search
I am a noob at JS (Kai) :V
Line 81: Line 81:  
             var property = multi_toggle_element.data("target") || "default",
 
             var property = multi_toggle_element.data("target") || "default",
 
                 property_states = multi_toggle_element.data("states"),
 
                 property_states = multi_toggle_element.data("states"),
                 property_default = multi_toggle_element.data("default") || false,
+
                 property_default = multi_toggle_element.data("default"),
 
                 property_filter = multi_toggle_element.data("filter") || false, //Whether or not the multi toggle is a filter
 
                 property_filter = multi_toggle_element.data("filter") || false, //Whether or not the multi toggle is a filter
 
                 target = "multi-toggle-target-" + property,
 
                 target = "multi-toggle-target-" + property,
Line 90: Line 90:  
                 return;
 
                 return;
 
             } else if (property_filter) {
 
             } else if (property_filter) {
                 property_states.splice(0, 0, false)
+
                 property_states.splice(0, 0, "none")
 
             }
 
             }
 
             //need to set default here rather than in the declaration above to ensure the states are valid.
 
             //need to set default here rather than in the declaration above to ensure the states are valid.
Line 97: Line 97:  
             }
 
             }
 
             //set the new state of the multi toggle.
 
             //set the new state of the multi toggle.
             if ((selected || selected === false) && property_states.indexOf(selected) >= 0) {
+
             if (selected && property_states.indexOf(selected) >= 0) {
 
                 if ((property_filter && multiToggleStorage.on(selected))) {
 
                 if ((property_filter && multiToggleStorage.on(selected))) {
                     multiToggleStorage.set(false);
+
                     multiToggleStorage.set("none");
 
                 } else {
 
                 } else {
 
                     multiToggleStorage.set(selected);
 
                     multiToggleStorage.set(selected);
Line 113: Line 113:  
                     $(toggle_show_selector).hide();
 
                     $(toggle_show_selector).hide();
 
                     $(toggle_hide_selector).show();
 
                     $(toggle_hide_selector).show();
                     if (selected === false) {
+
                     if (selected === "none") {
 
                         $("." + target + "-" + state).show();
 
                         $("." + target + "-" + state).show();
 
                     } else {
 
                     } else {
Anonymous user

Navigation menu