summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/_inc/build/sharedaddy')
-rw-r--r--plugins/jetpack/_inc/build/sharedaddy/admin-sharing.min.js4
-rw-r--r--plugins/jetpack/_inc/build/sharedaddy/sharing.min.js4
2 files changed, 8 insertions, 0 deletions
diff --git a/plugins/jetpack/_inc/build/sharedaddy/admin-sharing.min.js b/plugins/jetpack/_inc/build/sharedaddy/admin-sharing.min.js
new file mode 100644
index 00000000..347a7c06
--- /dev/null
+++ b/plugins/jetpack/_inc/build/sharedaddy/admin-sharing.min.js
@@ -0,0 +1,4 @@
+/* Do not modify this file directly. It is compiled from other files. */
+/* jshint onevar: false, smarttabs: true */
+/* global sharing_loading_icon */
+!function(e){e(document).ready(function(){function i(){e(".preview a.sharing-anchor").unbind("mouseenter mouseenter").hover(function(){if(!0!==e(this).data("hasappeared")){var i=e(".sharing-hidden .inner"),a=e(this).parents("li"),s=setTimeout(function(){e(i).css({left:e(a).position().left+"px",top:e(a).position().top+e(a).height()+3+"px"}).slideDown(200,function(){e(a).data("hasappeared",!0).data("hasoriginal",!0).data("hasitem",!1),e(i).mouseleave(s).mouseenter(n),e(a).mouseleave(r).mouseenter(t),e(a).click(l)});var s=function(){if(e(a).data("hasitem",!1),!1===e(a).data("hasoriginal")){var i=setTimeout(l,800);e(a).data("timer2",i)}},n=function(){e(a).data("hasitem",!0),clearTimeout(e(a).data("timer2"))},r=function(){if(e(a).data("hasoriginal",!1),!1===e(a).data("hasitem")){var i=setTimeout(l,800);e(a).data("timer2",i)}},t=function(){e(a).data("hasoriginal",!0),clearTimeout(e(a).data("timer2"))},l=function(){return i.slideUp(200),e(a).unbind("mouseleave",r).unbind("mouseenter",t),e(i).unbind("mouseleave",s).unbind("mouseenter",s),e(a).data("hasappeared",!1),e(a).unbind("click",l),!1}},200);e(this).data("timer",s)}},function(){clearTimeout(e(this).data("timer")),e(this).data("timer",!1)})}function a(){var a=e("#button_style").val();e("#live-preview ul.preview li").remove(),(e("#save-enabled-shares input[name=visible]").val()||e("#save-enabled-shares input[name=hidden]").val())&&e("#live-preview ul.preview").append(e("#live-preview ul.archive .sharing-label").clone()),e("ul.services-enabled li").each(function(){if(e(this).hasClass("service")){var i=e(this).attr("id");e("#live-preview ul.preview").append(e("#live-preview ul.archive li.preview-"+i).clone())}}),e("#save-enabled-shares input[name=hidden]").val()&&(e("#live-preview ul.preview").append(e("#live-preview ul.archive .share-more").parent().clone()),e(".sharing-hidden ul li").remove(),e("ul.services-hidden li").each(function(){if(e(this).hasClass("service")){var i=e(this).attr("id");e(".sharing-hidden .inner ul").append(e("#live-preview ul.archive .preview-"+i).clone())}}),i()),e("#live-preview div.sharedaddy").removeClass("sd-social-icon"),e("#live-preview li.advanced").removeClass("no-icon"),"icon"===a?(e("#live-preview ul.preview div span, .sharing-hidden .inner ul div span").html("&nbsp;").parent().addClass("no-text"),e("#live-preview div.sharedaddy").addClass("sd-social-icon")):"official"===a?e("#live-preview ul.preview .advanced, .sharing-hidden .inner ul .advanced").each(function(){e(this).hasClass("preview-press-this")||e(this).hasClass("preview-email")||e(this).hasClass("preview-print")||e(this).hasClass("preview-telegram")||e(this).hasClass("preview-jetpack-whatsapp")||e(this).hasClass("share-custom")||e(this).hasClass("share-deprecated")||e(this).find(".option a span").html("").parent().removeClass("sd-button").parent().attr("class","option option-smart-on")}):"text"===a&&e("#live-preview li.advanced").addClass("no-icon")}function s(e){jQuery("."+e+"-extra-options").css({backgroundColor:"#ffffcc"}).fadeIn()}function n(){e("#enabled-services h3 img").show(),e("#enabled-services ul.services-enabled li.service").length>0?e("#drag-instructions").hide():e("#drag-instructions").show(),e("#enabled-services li.service").length>0?e("#live-preview .services h2").hide():e("#live-preview .services h2").show();var i=[],n=[];e("ul.services-enabled li").each(function(){e(this).hasClass("service")&&(i[i.length]=e(this).attr("id"),s(e(this).attr("id")))}),e("ul.services-available li").each(function(){var i;e(this).hasClass("service")&&(i=e(this).attr("id"),jQuery("."+i+"-extra-options").fadeOut("slow"))}),e("ul.services-hidden li").each(function(){e(this).hasClass("service")&&(n[n.length]=e(this).attr("id"),s(e(this).attr("id")))}),e("#save-enabled-shares input[name=visible]").val(i.join(",")),e("#save-enabled-shares input[name=hidden]").val(n.join(",")),a(),e("#save-enabled-shares").ajaxSubmit(function(){e("#enabled-services h3 img").hide()})}function r(e,i){var a,s=e.parent(),r=s.find("li"),t=r.index(e)+1,l=r.length-1;if(!s.hasClass("services-available")){if("left"===i){if(1===t)return;var c=e.prev();a=e.detach(),c.before(a),c.prev().focus()}if("right"===i){if(t===l)return;var o=e.next();a=e.detach(),o.after(a),o.next().focus()}n()}}function t(i){var a,s=i.parent();a=s.hasClass("services-available")?"services-enabled":s.hasClass("services-enabled")?"services-hidden":"services-available";var r=i.detach();e("."+a).prepend(r).find("li:first-child").focus(),n()}window.sharing_option_changed=function(){var i=this;return e(this).parents("li:first").css("backgroundImage",'url("'+sharing_loading_icon+'")'),e(this).parents("form").ajaxSubmit(function(s){if(s.indexOf("\x3c!---")>=0){var n=s.substring(0,s.indexOf("\x3c!---\x3e")),r=s.substring(s.indexOf("\x3c!---\x3e")+6);!0===e(i).is(":submit")&&e(i).parents("li:first").replaceWith(n),e("#live-preview ul.archive li.preview-"+e(i).parents("form").find("input[name=service]").val()).replaceWith(r)}a(),e(i).parents("li:first").removeAttr("style")}),!0!==e(i).is(":submit")},e("#enabled-services .services ul").sortable({receive:function(){n()},stop:function(){n(),e("li.service").enableSelection()},over:function(){e(this).find("ul").addClass("dropping"),e("#enabled-services li.end-fix").remove(),e("#enabled-services ul").append('<li class="end-fix"></li>')},out:function(){e(this).find("ul").removeClass("dropping"),e("#enabled-services li.end-fix").remove(),e("#enabled-services ul").append('<li class="end-fix"></li>')},helper:function(e,i){return i.find(".advanced-form").hide(),i.clone()},start:function(){e(".advanced-form").hide(),e("li.service").disableSelection()},placeholder:"dropzone",opacity:.8,delay:150,forcePlaceholderSize:!0,items:"li",connectWith:"#available-services ul, #enabled-services .services ul",cancel:".advanced-form"}),e("#available-services ul").sortable({opacity:.8,delay:150,cursor:"move",connectWith:"#enabled-services .services ul",placeholder:"dropzone",forcePlaceholderSize:!0,start:function(){e(".advanced-form").hide()}}),e(".service").on("keydown",function(i){switch(i.keyCode){case 13:case 32:t(e(this));break;case 37:r(e(this),"left");break;case 39:r(e(this),"right");break;default:return!0}i.preventDefault()}),e(".preview-hidden a").click(function(){return e(this).parent().find(".preview").toggle(),!1}),e("#new-service form").ajaxForm({beforeSubmit:function(){e("#new-service-form .error").hide(),e("#new-service-form img").show(),e("#new-service-form input[type=submit]").prop("disabled",!0)},success:function(i){e("#new-service-form img").hide(),""+i=="1"?(e("#new-service-form .inerror").removeClass("inerror").addClass("error"),e("#new-service-form .error").show(),e("#new-service-form input[type=submit]").prop("disabled",!1)):document.location.reload()}}),e("#button_style").change(function(){return a(),!0}).change(),e("input[name=sharing_label]").blur(function(){e("#live-preview h3.sd-title").text(e("<div/>").text(e(this).val()).html())}),e("#services-config a.remove").unbind("click").click(function(){var i=e(this).parent().next();return e(this).parents("li:first").css("backgroundImage",'url("'+sharing_loading_icon+'")'),i.ajaxSubmit(function(){i.parents("li:first").fadeOut(function(){e(this).remove(),a()})}),!1}),i()})}(jQuery); \ No newline at end of file
diff --git a/plugins/jetpack/_inc/build/sharedaddy/sharing.min.js b/plugins/jetpack/_inc/build/sharedaddy/sharing.min.js
new file mode 100644
index 00000000..8ba62711
--- /dev/null
+++ b/plugins/jetpack/_inc/build/sharedaddy/sharing.min.js
@@ -0,0 +1,4 @@
+/* Do not modify this file directly. It is compiled from other files. */
+/* global WPCOM_sharing_counts, grecaptcha */
+/* jshint unused:false */
+var sharing_js_options;if(sharing_js_options&&sharing_js_options.counts)var WPCOMSharing={done_urls:[],get_counts:function(){var t,e,i,n,a;if("undefined"!=typeof WPCOM_sharing_counts)for(t in WPCOM_sharing_counts)if(i=WPCOM_sharing_counts[t],void 0===WPCOMSharing.done_urls[i]){for(n in e={pinterest:[window.location.protocol+"//api.pinterest.com/v1/urls/count.json?callback=WPCOMSharing.update_pinterest_count&url="+encodeURIComponent(t)],facebook:[window.location.protocol+"//graph.facebook.com/?callback=WPCOMSharing.update_facebook_count&ids="+encodeURIComponent(t)]})if(jQuery("a[data-shared=sharing-"+n+"-"+i+"]").length){for(;a=e[n].pop();)jQuery.getScript(a);sharing_js_options.is_stats_active&&WPCOMSharing.bump_sharing_count_stat(n)}WPCOMSharing.done_urls[i]=!0}},get_permalink:function(t){return t="https:"===window.location.protocol?t.replace(/^http:\/\//i,"https://"):t.replace(/^https:\/\//i,"http://")},update_facebook_count:function(t){var e,i;if(t)for(e in t)t.hasOwnProperty(e)&&t[e].share&&t[e].share.share_count&&(i=WPCOMSharing.get_permalink(e))in WPCOM_sharing_counts&&WPCOMSharing.inject_share_count("sharing-facebook-"+WPCOM_sharing_counts[i],t[e].share.share_count)},update_pinterest_count:function(t){void 0!==t.count&&1*t.count>0&&WPCOMSharing.inject_share_count("sharing-pinterest-"+WPCOM_sharing_counts[t.url],t.count)},inject_share_count:function(t,e){var i=jQuery("a[data-shared="+t+"] > span");i.find(".share-count").remove(),i.append('<span class="share-count">'+WPCOMSharing.format_count(e)+"</span>")},format_count:function(t){return t<1e3?t:t>=1e3&&t<1e4?String(t).substring(0,1)+"K+":"10K+"},bump_sharing_count_stat:function(t){(new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv&x_sharing-count-request="+t+"&r="+Math.random()}};!function(t){var e,i;function n(){var e;void 0!==WPCOMSharing&&WPCOMSharing.get_counts(),(e=t(".sharedaddy a.sharing-anchor")).click(function(){return!1}),t(".sharedaddy a").each(function(){t(this).attr("href")&&-1!==t(this).attr("href").indexOf("share=")&&t(this).attr("href",t(this).attr("href")+"&nb=1")}),e.on("click",function(){var e=t(this),n=e.parents("div:first").find(".inner");n.is(":animated")||!0!==n.data("justSlid")&&(i.slideUp(200),n.css({left:e.position().left+"px",top:e.position().top+e.height()+3+"px"}).slideToggle(200))}),void 0===document.ontouchstart?e.hover(function(){var e,n=t(this),a=n.parents("div:first").find(".inner");a.is(":animated")||(e=setTimeout(function(){var t,e,r,o,s;i.slideUp(200),a.data("justSlid",!0),a.css({left:n.position().left+"px",top:n.position().top+n.height()+3+"px"}).slideDown(200,function(){n.data("hasoriginal",!0).data("hasitem",!1),setTimeout(function(){a.data("justSlid",!1)},300),a.mouseleave(t).mouseenter(e),n.mouseleave(r).mouseenter(o)}),t=function(){if(n.data("hasitem",!1),!1===n.data("hasoriginal")){var t=setTimeout(s,800);n.data("timer2",t)}},e=function(){n.data("hasitem",!0),clearTimeout(n.data("timer2"))},r=function(){if(n.data("hasoriginal",!1),!1===n.data("hasitem")){var t=setTimeout(s,800);n.data("timer2",t)}},o=function(){n.data("hasoriginal",!0),clearTimeout(n.data("timer2"))},s=function(){return a.data("justSlid",!0),a.slideUp(200,function(){setTimeout(function(){a.data("justSlid",!1)},300)}),n.unbind("mouseleave",r).unbind("mouseenter",o),a.unbind("mouseleave",t).unbind("mouseenter",t),!1}},200),n.data("timer",e))},function(){e.each(function(){clearTimeout(t(this).data("timer"))}),e.data("timer",!1)}):t(document.body).addClass("jp-sharing-input-touch"),t(document).click(function(){e.each(function(){clearTimeout(t(this).data("timer"))}),e.data("timer",!1),t(".sharedaddy .inner").slideUp()}),t(".sharedaddy ul").each(function(){if("yep"!==t(this).data("has-click-events")){t(this).data("has-click-events","yep");t(this).find("a.share-print").click(function(){var e=t(this).attr("href"),i=function(){if(-1===e.indexOf("#print")){var i=(new Date).getTime();n=i,a=e,t("body:first").append('<iframe style="position:fixed;top:100;left:100;height:1px;width:1px;border:none;" id="printFrame-'+n+'" name="printFrame-'+n+'" src="'+a+'" onload="frames[\'printFrame-'+n+"'].focus();frames['printFrame-"+n+"'].print();\"></iframe>")}else print();var n,a};return t(this).parents(".sharing-hidden").length>0?t(this).parents(".inner").slideUp(0,function(){i()}):i(),!1}),t(this).find("a.share-press-this").click(function(){var e="";return window.getSelection?e=window.getSelection():document.getSelection?e=document.getSelection():document.selection&&(e=document.selection.createRange().text),e&&t(this).attr("href",t(this).attr("href")+"&sel="+encodeURI(e)),window.open(t(this).attr("href"),"t","toolbar=0,resizable=1,scrollbars=1,status=1,width=720,height=570")||(document.location.href=t(this).attr("href")),!1}),t("a.share-email",this).on("click",function(){var e=t(this).attr("href"),n=window.location.protocol+"//"+window.location.hostname+"/";return 0!==e.indexOf(n)||(i.is(":visible")?i.slideUp(200):(t(".sharedaddy .inner").slideUp(),t("#sharing_email .response").remove(),t("#sharing_email form").show(),t("#sharing_email form input[type=submit]").removeAttr("disabled"),t("#sharing_email form a.sharing_cancel").show(),"object"==typeof grecaptcha&&"function"==typeof grecaptcha.reset&&window.___grecaptcha_cfg.count&&grecaptcha.reset(),i.css({left:t(this).offset().left+"px",top:t(this).offset().top+t(this).height()+"px"}).slideDown(200),t("#sharing_email a.sharing_cancel").unbind("click").click(function(){return t("#sharing_email .errors").hide(),i.slideUp(200),t("#sharing_background").fadeOut(),!1}),t("#sharing_email input[type=submit]").unbind("click").click(function(){var n=t(this).parents("form"),a=n.find("input[name=source_email]"),r=n.find("input[name=target_email]");return t(this).prop("disabled",!0),n.find("a.sharing_cancel").hide(),n.find("img.loading").show(),t("#sharing_email .errors").hide(),t("#sharing_email .error").removeClass("error"),a.share_is_email()||a.addClass("error"),r.share_is_email()||r.addClass("error"),0===t("#sharing_email .error").length?(t.ajax({url:e,type:"POST",data:n.serialize(),success:function(e){n.find("img.loading").hide(),"1"===e||"2"===e||"3"===e?(t("#sharing_email .errors-"+e).show(),n.find("input[type=submit]").removeAttr("disabled"),n.find("a.sharing_cancel").show(),"object"==typeof grecaptcha&&"function"==typeof grecaptcha.reset&&grecaptcha.reset()):(t("#sharing_email form").hide(),i.append(e),t("#sharing_email a.sharing_cancel").click(function(){return i.slideUp(200),t("#sharing_background").fadeOut(),!1}))}}),!1):(n.find("img.loading").hide(),n.find("input[type=submit]").removeAttr("disabled"),n.find("a.sharing_cancel").show(),t("#sharing_email .errors-1").show(),!1)})),!1)})}}),t("li.share-email, li.share-custom a.sharing-anchor").addClass("share-service-visible")}t.fn.extend({share_is_email:function(){return/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(this.val())}}),e=t(document.body).on("post-load",n),t(document).ready(function(){i=t("#sharing_email"),e.append(i),n()})}(jQuery); \ No newline at end of file