diff --git a/tfdclerk.js b/tfdclerk.js index be67605..30cea03 100644 --- a/tfdclerk.js +++ b/tfdclerk.js @@ -35,7 +35,8 @@ mw.loader.using(["mediawiki.ui", "jquery.ui.core"], function() { return; TFDClerk = { - sysop: $.inArray("sysop", mw.config.get("wgUserGroups")) >= 0 + sysop: $.inArray("sysop", mw.config.get("wgUserGroups")) >= 0, + counter: 1 }; TFDClerk._get_today = function() { @@ -61,7 +62,7 @@ mw.loader.using(["mediawiki.ui", "jquery.ui.core"], function() { TFDClerk._add_option_box = function(head, verb, title, callback, options) { var box = $("
", { - id: "tfdclerk-" + verb + "-box-" + head.uniqueId().prop("id"), + id: "tfdclerk-" + verb + "-box-" + TFDClerk.counter++, addClass: "tfdclerk-" + verb + "-box" }) .css("border", "1px solid #AAA") @@ -69,7 +70,7 @@ mw.loader.using(["mediawiki.ui", "jquery.ui.core"], function() { .css("margin", "0.5em 0") .css("padding", "1em") .append($("
", {text: title, style: "padding-top: 0;"})); - options(box); + options(box, box.prop("id") + "-"); box.append($("