require(["jquery","xwiki-meta"],function(b,c){b(document).on("click","#button-inout",function(){var d=b("#button-inout");var g=b("#reference-value");var e=c.documentReference.relativeTo(c.documentReference.getRoot());var f=c.documentReference;if(d.hasClass("btn-info")){g.text(e);d.removeClass("btn-info");d.attr("title","显示所有维基的页面参考")}else{g.text(f);d.addClass("btn-info");d.attr("title","仅显示此Wiki的页面参考")}});var a=function(d){var f=b("<input>");b("body").append(f);var e=b(d).text();f.val(e).select();document.execCommand("copy");f.remove();return e};b(document).on("click","#button-paste",function(){a("#reference-value");new XWiki.widgets.Notification("参考已复制到剪贴板","info")})});