Board Thread:Wikia Discussion/@comment-26091666-20160125084257/@comment-26154973-20160219214249

Noticed that it doesn't work under tabber, only on individual pages, because there is no droplist to alter when the tabbed page is loaded. The only way I can think of to fix this is to run updating routine under setInterval, while this is kinda fat, it will also update other pages without the need to reload them (or clicking the button twice).

Update code: (function($) {   "use strict";    $(document).ready(function { if (typeof(Storage) === "undefined") { return; }       var ToggleStorage = function(property, property_default) { if (!localStorage[property]) { localStorage[property] = property_default; }           return { toggle: function { localStorage[property] = localStorage[property] === "show" ? "hide" : "show"; },               on: function { return localStorage[property] === "show"; }           };        }        function update(toggle_element, toggle) { var property = toggle_element.data("target") || "default", property_default = toggle_element.data("default") || "show", target = "toggle-target-" + property, target_class = "." + target, toggleStorage = ToggleStorage(target, property_default); if (toggle) { toggleStorage.toggle; }           if (toggleStorage.on) { toggle_element.find(".toggle-show").show; toggle_element.find(".toggle-hide").hide; $(target_class).show; } else { toggle_element.find(".toggle-show").hide; toggle_element.find(".toggle-hide").show; $(target_class).hide; }       }        $(".toggle").each(function {            $(this).show;            update($(this));        });

// keep updating (1 sec. interval) for tabber and to sync other opened pages setInterval(function {           $(".toggle").each(function { $(this).show; update($(this)); });       }, 1 * 1000);        $(".toggle").click(function {            update($(this), true);        });

}); }(jQuery));