"use strict";!function(e){e(document).on("click",".subscribe_link",(function(){var t=e(this),i=t.data(),r=foswiki.getScriptUrlPath("rest","SubscribePlugin","subscribe");return"undefined"!=typeof StrikeOne&&(i.validation_key=StrikeOne.calculateNewKey(i.validationKey)),e.ajax({type:"POST",data:i,url:r,success:function(e){"\n"==t.text()?t.attr("title",e.message):t.text(e.message),i.remove=e.remove},error:function(e){alert("Error: "+e.responseText)},complete:function(e){var t=e.getResponseHeader("X-Foswiki-Validation");t&&(i.validationKey="?"+t)}}),t.blur(),!1}))}(jQuery);
