require(["jquery","xwiki-events-bridge"],function(e){var d=function(){var k=e("input[type='radio'][name='rev1']:checked").val()||"";var j=e("input[type='radio'][name='rev2']:checked").val()||"";return{rev1:k,rev2:j}};var b=function(){return e("#historyform")};var c=function(j){b().submit()};var i=function(m){m.preventDefault();var j=d();var k=XWiki.docvariant;var l=XWiki.currentDocument.getURL("view","viewer=changes&rev1=__rev1__&rev2=__rev2__&"+k).replace("__rev1__",j.rev1).replace("__rev2__",j.rev2);b().attr("action",l);c()};var g=function(m){m.preventDefault();var j=d();var l="Это действие необратимо. Вы уверены, что хотите удалить версии с __rev1__ до __rev2__ включительно?".replace("__rev1__",j.rev1).replace("__rev2__",j.rev2);if(!confirm(l)){return false}var k=XWiki.currentDocument.getURL("deleteversions","confirm=1");b().attr("action",k);c()};var a=function(l){l.preventDefault();var j=XWiki.docvariant;var k=XWiki.currentDocument.getURL("view","viewer=history&showminor=true&"+j);b().attr("action",k);c()};var f=function(l){l.preventDefault();var j=XWiki.docvariant;var k=XWiki.currentDocument.getURL("view","viewer=history&"+j);b().attr("action",k);c()};var h=function(){var k=e("input[type='submit'][name='displayCompare']");k.on("click",i);var j=e("input[type='submit'][name='deleteVersions']");j.on("click",g);var l=e("input[type='submit'][name='viewMinorVersions']");l.on("click",a);var m=e("input[type='submit'][name='hideMinorVersions']");m.on("click",f)};e(document).on("xwiki:docextra:loaded",h);h()});