- 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
Line 1:
Line 1:
− +
Line 6:
Line 6:
− +
Line 31:
Line 31:
− toggle_element.find(".toggle-show").show(); +
− toggle_element.find(".toggle-hide").hide(); +
− toggle_element.find(".toggle-show").hide(); +
− toggle_element.find(".toggle-hide").show(); +
−
− $(".toggle").each(function() {
− $(this).show();
− update($(this));
− });
− +
− update($(this), true);+
− +
+
+
+
+
+
+
+
+
+
+
+
− +
Compatibility with tabview
(function($) {
(function(mw, $) {
"use strict";
"use strict";
$(document).ready(function() {
$(document).ready(function() {
return;
return;
}
}
var ToggleStorage = function(property, property_default) {
var ToggleStorage = function(property, property_default) {
if (!localStorage[property]) {
if (!localStorage[property]) {
}
}
if (toggleStorage.on()) {
if (toggleStorage.on()) {
$(".toggle-show").show();
$(".toggle-hide").hide();
$(target_class).show();
$(target_class).show();
} else {
} else {
$(".toggle-show").hide();
$(".toggle-hide").show();
$(target_class).hide();
$(target_class).hide();
}
}
}
}
$(".toggle").click(function() {
function updateContent() {
$(".toggle").each(function() {
});
var toggle_element = $(this);
toggle_element.show();
update(toggle_element);
toggle_element.off("click");
toggle_element.click(function() {
update(toggle_element, true);
});
});
}
updateContent();
mw.hook("wikipage.content").add(updateContent);
});
});
}(jQuery));
}(mediaWiki, jQuery));