Social Media Share Buttons | MashShare - Version 3.4.0

Version Description

  • New: Google Analytics add-on allows to append utm_source tracking params for traffic tracking with google Analytics
  • Fix: Pinterest and google plus share counts are not cummulated together with http/https option
  • Fix: Remove admin notice if Facebook access token is empty
  • Fix: Remove console.log test notice
  • Fix: Check if multi_curl_exec is allowed
  • Fix: Share count not incrementing if transient mashsb_limit_req expiration is not set. (Caused by Possible WP Bug or custom theme transient filter)
  • Tweak: Use https endpoint for facebook sharing url
Download this release

Release Info

Developer ReneHermi
Plugin Icon 128x128 Social Media Share Buttons | MashShare
Version 3.4.0
Comparing to
See all releases

Code changes from version 3.3.9 to 3.4.0

assets/js/mashsb-admin.js CHANGED
@@ -34,7 +34,6 @@ jQuery(document).ready(function ($) {
34
 
35
  $('#mashsb_verify_fbtoken').on("click",function(e){
36
  e.preventDefault();
37
- console.log('test');
38
  if ($('#mashsb_settings\\[fb_access_token_new\\]').val()){
39
  check_access_token();
40
  }
34
 
35
  $('#mashsb_verify_fbtoken').on("click",function(e){
36
  e.preventDefault();
 
37
  if ($('#mashsb_settings\\[fb_access_token_new\\]').val()){
38
  check_access_token();
39
  }
assets/js/mashsb-admin.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(a){function b(){a.ajax("https://graph.facebook.com/v2.7/?id=http://www.google.com&access_token="+a("#mashsb_settings\\[fb_access_token_new\\]").val()).done(function(b){a("#mashsb_token_notice").html("<strong>Token valid:</strong> Facebook share count for http://google.com: "+b.share.share_count),console.log(b)}).fail(function(b){a("#mashsb_token_notice").html('<span style="color:red;"> <strong>Error:</strong> Access Token Invalid!</span>'),console.log(b)})}function c(a,b,c){if(c){var d=new Date;d.setTime(d.getTime()+24*c*60*60*1e3);var e="; expires="+d.toGMTString()}else var e="";document.cookie=a+"="+b+e+"; path=/"}function d(a){for(var b=a+"=",c=document.cookie.split(";"),d=0;d<c.length;d++){for(var e=c[d];" "==e.charAt(0);)e=e.substring(1,e.length);if(0==e.indexOf(b))return e.substring(b.length,e.length)}return null}function e(){var a=jQuery(".mashsb-tabs.active").find("a").attr("href");c("mashsb_active_tab",a)}function f(){var a=d("mashsb_active_tab");return null==a&&(a="#mashsb_settingsgeneral_header"),a}function g(){var a,b;return a=jQuery(".mashsb.nav-tab-wrapper a.nav-tab-active:nth-child(2)"),b=jQuery(".mashsb.nav-tab-wrapper a.nav-tab-active:nth-child(3)"),a.length>0||b.length>0?void 0:f()+"-nav"}a(".mashsb-color-box").each(function(){a(this).colpick({layout:"hex",submit:0,colorScheme:"light",onChange:function(b,c,d,e,f){a(e).css("border-color","#"+c),f||a(e).val(c)}}).keyup(function(){a(this).colpickSetColor(this.value)}),a(this).colpick({layout:"hex",submit:0,colorScheme:"light",onChange:function(b,c,d,e,f){a(e).css("border-color","#"+c),f||a(e).val(c)}}).keyup(function(){a(this).colpickSetColor(this.value)})}),a("#mashsb_verify_fbtoken").on("click",function(c){c.preventDefault(),console.log("test"),a("#mashsb_settings\\[fb_access_token_new\\]").val()&&b()}),a("#mashsb_fb_auth").click(function(b){b.preventDefault(),winWidth=520,winHeight=350;var c=screen.height/2-winHeight/2,d=screen.width/2-winWidth/2,e=a(this).attr("href");mashsb_fb_auth=window.open(e,"mashsb_fb_auth","top="+c+",left="+d+",toolbar=0,status=0,width="+winWidth+",height="+winHeight+",resizable=yes")}),a("#mashsb_settings\\[responsive_buttons\\]").attr("checked")?a("#mashsb_settings\\[button_width\\]").closest(".row").css("display","none"):a("#mashsb_settings\\[button_width\\]").closest(".row").fadeIn(300).css("display","table-row"),a("#mashsb_settings\\[responsive_buttons\\]").click(function(){a(this).attr("checked")?a("#mashsb_settings\\[button_width\\]").closest(".row").css("display","none"):a("#mashsb_settings\\[button_width\\]").closest(".row").fadeIn(300).css("display","table-row")}),a(".mashsb-chosen-select").chosen({width:"400px"}),a("#mashsb_settings\\[caching_method\\]").change(function(){"refresh_loading"===a("#mashsb_settings\\[caching_method\\]").val()?a("#mashsb_settings\\[mashsharer_cache\\]").closest(".row").fadeIn(300).css("display","table-row"):a("#mashsb_settings\\[mashsharer_cache\\]").closest(".row").css("display","none")}),"refresh_loading"===a("#mashsb_settings\\[caching_method\\]").val()?a("#mashsb_settings\\[mashsharer_cache\\]").closest(".row").fadeIn(300).css("display","table-row"):a("#mashsb_settings\\[mashsharer_cache\\]").closest(".row").css("display","none"),a(".mashsb-tabs").length&&a("#mashsb_container").easytabs({animate:!0,updateHash:!0,defaultTab:g()}),a("#mashsb_container").bind("easytabs:after",function(){0==jQuery(".mashsb.nav-tab-wrapper a.nav-tab-active:nth-child(2)").length&&e()}),a(".mashtab").length&&a(".tabcontent_container").easytabs({animate:!0}),a("#mashsb_network_list").sortable({items:".mashsb_list_item",opacity:.6,cursor:"move",axis:"y",update:function(){var b=a(this).sortable("serialize")+"&action=mashsb_update_order";a.post(ajaxurl,b,function(){})}}),a(".mashsb-helper").click(function(b){b.preventDefault();var c=a(this),d=a(this).next();a(".mashsb-message").not(d).hide();var e=c.position();d.css(d.hasClass("bottom")?{left:e.left-d.width()/2+"px",top:e.top+c.height()+9+"px"}:{left:e.left+c.width()+9+"px",top:e.top+c.height()/2-18+"px"}),d.toggle(),b.stopPropagation()}),a("body").click(function(){a(".mashsb-message").hide()}),a(".mashsb-message").click(function(a){a.stopPropagation()})}),function(a,b,c){function d(a){return a=a||location.href,"#"+a.replace(/^[^#]*#?(.*)$/,"$1")}var e,f="hashchange",g=document,h=a.event.special,i=g.documentMode,j="on"+f in b&&(i===c||i>7);a.fn[f]=function(a){return a?this.bind(f,a):this.trigger(f)},a.fn[f].delay=50,h[f]=a.extend(h[f],{setup:function(){return j?!1:void a(e.start)},teardown:function(){return j?!1:void a(e.stop)}}),e=function(){function e(){var c=d(),g=n(k);c!==k?(m(k=c,g),a(b).trigger(f)):g!==k&&(location.href=location.href.replace(/#.*/,"")+g),h=setTimeout(e,a.fn[f].delay)}var h,i={},k=d(),l=function(a){return a},m=l,n=l;return i.start=function(){h||e()},i.stop=function(){h&&clearTimeout(h),h=c},a.browser.msie&&!j&&function(){var b,c;i.start=function(){b||(c=a.fn[f].src,c=c&&c+d(),b=a('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){c||m(d()),e()}).attr("src",c||"javascript:0").insertAfter("body")[0].contentWindow,g.onpropertychange=function(){try{"title"===event.propertyName&&(b.document.title=g.title)}catch(a){}})},i.stop=l,n=function(){return d(b.location.href)},m=function(c,d){var e=b.document,h=a.fn[f].domain;c!==d&&(e.title=g.title,e.open(),h&&e.write('<script>document.domain="'+h+'"</script>'),e.close(),b.location.hash=c)}}(),i}()}(jQuery,this),function(a){a.easytabs=function(b,c){var d,e,f,g,h,i,j=this,k=a(b),l={animate:!0,panelActiveClass:"active",tabActiveClass:"active",defaultTab:"li:first-child",animationSpeed:"normal",tabs:"> ul > li",updateHash:!0,cycle:!1,collapsible:!1,collapsedClass:"collapsed",collapsedByDefault:!0,uiTabs:!1,transitionIn:"fadeIn",transitionOut:"fadeOut",transitionInEasing:"swing",transitionOutEasing:"swing",transitionCollapse:"slideUp",transitionUncollapse:"slideDown",transitionCollapseEasing:"swing",transitionUncollapseEasing:"swing",containerClass:"",tabsClass:"",tabClass:"",panelClass:"",cache:!0,event:"click",panelContext:k},m={fast:200,normal:400,slow:600};j.init=function(){j.settings=i=a.extend({},l,c),i.bind_str=i.event+".easytabs",i.uiTabs&&(i.tabActiveClass="ui-tabs-selected",i.containerClass="ui-tabs ui-widget ui-widget-content ui-corner-all",i.tabsClass="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all",i.tabClass="ui-state-default ui-corner-top",i.panelClass="ui-tabs-panel ui-widget-content ui-corner-bottom"),i.collapsible&&void 0!==c.defaultTab&&void 0===c.collpasedByDefault&&(i.collapsedByDefault=!1),"string"==typeof i.animationSpeed&&(i.animationSpeed=m[i.animationSpeed]),a("a.anchor").remove().prependTo("body"),k.data("easytabs",{}),j.setTransitions(),j.getTabs(),o(),p(),r(),v(),w(),k.attr("data-easytabs",!0)},j.setTransitions=function(){f=i.animate?{show:i.transitionIn,hide:i.transitionOut,speed:i.animationSpeed,collapse:i.transitionCollapse,uncollapse:i.transitionUncollapse,halfSpeed:i.animationSpeed/2}:{show:"show",hide:"hide",speed:0,collapse:"hide",uncollapse:"show",halfSpeed:0}},j.getTabs=function(){var b;j.tabs=k.find(i.tabs),j.panels=a(),j.tabs.each(function(){var c=a(this),d=c.children("a"),e=c.children("a").data("target");c.data("easytabs",{}),void 0!==e&&null!==e?c.data("easytabs").ajax=d.attr("href"):e=d.attr("href"),e=e.match(/#([^\?]+)/)[1],b=i.panelContext.find("#"+e),b.length?(b.data("easytabs",{position:b.css("position"),visibility:b.css("visibility")}),b.not(i.panelActiveClass).hide(),j.panels=j.panels.add(b),c.data("easytabs").panel=b):(j.tabs=j.tabs.not(c),"console"in window&&console.warn("Warning: tab without matching panel for selector '#"+e+"' removed from set"))})},j.selectTab=function(a,b){var c=window.location,d=(c.hash.match(/^[^\?]*/)[0],a.parent().data("easytabs").panel),e=a.parent().data("easytabs").ajax;i.collapsible&&!h&&(a.hasClass(i.tabActiveClass)||a.hasClass(i.collapsedClass))?j.toggleTabCollapse(a,d,e,b):a.hasClass(i.tabActiveClass)&&d.hasClass(i.panelActiveClass)?i.cache||s(a,d,e,b):s(a,d,e,b)},j.toggleTabCollapse=function(a,b,c,d){j.panels.stop(!0,!0),n(k,"easytabs:before",[a,b,i])&&(j.tabs.filter("."+i.tabActiveClass).removeClass(i.tabActiveClass).children().removeClass(i.tabActiveClass),a.hasClass(i.collapsedClass)?(!c||i.cache&&a.parent().data("easytabs").cached||(k.trigger("easytabs:ajax:beforeSend",[a,b]),b.load(c,function(c,d,e){a.parent().data("easytabs").cached=!0,k.trigger("easytabs:ajax:complete",[a,b,c,d,e])})),a.parent().removeClass(i.collapsedClass).addClass(i.tabActiveClass).children().removeClass(i.collapsedClass).addClass(i.tabActiveClass),b.addClass(i.panelActiveClass)[f.uncollapse](f.speed,i.transitionUncollapseEasing,function(){k.trigger("easytabs:midTransition",[a,b,i]),"function"==typeof d&&d()})):(a.addClass(i.collapsedClass).parent().addClass(i.collapsedClass),b.removeClass(i.panelActiveClass)[f.collapse](f.speed,i.transitionCollapseEasing,function(){k.trigger("easytabs:midTransition",[a,b,i]),"function"==typeof d&&d()})))},j.matchTab=function(a){return j.tabs.find("[href='"+a+"'],[data-target='"+a+"']").first()},j.matchInPanel=function(a){return a&&j.validId(a)?j.panels.filter(":has("+a+")").first():[]},j.validId=function(a){return a.substr(1).match(/^[A-Za-z][A-Za-z0-9\-_:\.]*$/)},j.selectTabFromHashChange=function(){var a,b=window.location.hash.match(/^[^\?]*/)[0],c=j.matchTab(b);i.updateHash&&(c.length?(h=!0,j.selectTab(c)):(a=j.matchInPanel(b),a.length?(b="#"+a.attr("id"),c=j.matchTab(b),h=!0,j.selectTab(c)):d.hasClass(i.tabActiveClass)||i.cycle||(""===b||j.matchTab(g).length||k.closest(b).length)&&(h=!0,j.selectTab(e))))},j.cycleTabs=function(b){i.cycle&&(b%=j.tabs.length,$tab=a(j.tabs[b]).children("a").first(),h=!0,j.selectTab($tab,function(){setTimeout(function(){j.cycleTabs(b+1)},i.cycle)}))},j.publicMethods={select:function(b){var c;0===(c=j.tabs.filter(b)).length?0===(c=j.tabs.find("a[href='"+b+"']")).length&&0===(c=j.tabs.find("a"+b)).length&&0===(c=j.tabs.find("[data-target='"+b+"']")).length&&0===(c=j.tabs.find("a[href$='"+b+"']")).length&&a.error("Tab '"+b+"' does not exist in tab set"):c=c.children("a").first(),j.selectTab(c)}};var n=function(b,c,d){var e=a.Event(c);return b.trigger(e,d),e.result!==!1},o=function(){k.addClass(i.containerClass),j.tabs.parent().addClass(i.tabsClass),j.tabs.addClass(i.tabClass),j.panels.addClass(i.panelClass)},p=function(){var b,c=window.location.hash.match(/^[^\?]*/)[0],f=j.matchTab(c).parent();1===f.length?(d=f,i.cycle=!1):(b=j.matchInPanel(c),b.length?(c="#"+b.attr("id"),d=j.matchTab(c).parent()):(d=j.tabs.parent().find(i.defaultTab),0===d.length&&a.error("The specified default tab ('"+i.defaultTab+"') could not be found in the tab set ('"+i.tabs+"') out of "+j.tabs.length+" tabs."))),e=d.children("a").first(),q(f)},q=function(b){var c,f;i.collapsible&&0===b.length&&i.collapsedByDefault?d.addClass(i.collapsedClass).children().addClass(i.collapsedClass):(c=a(d.data("easytabs").panel),f=d.data("easytabs").ajax,!f||i.cache&&d.data("easytabs").cached||(k.trigger("easytabs:ajax:beforeSend",[e,c]),c.load(f,function(a,b,f){d.data("easytabs").cached=!0,k.trigger("easytabs:ajax:complete",[e,c,a,b,f])})),d.data("easytabs").panel.show().addClass(i.panelActiveClass),d.addClass(i.tabActiveClass).children().addClass(i.tabActiveClass)),k.trigger("easytabs:initialised",[e,c])},r=function(){j.tabs.children("a").bind(i.bind_str,function(b){i.cycle=!1,h=!1,j.selectTab(a(this)),b.preventDefault?b.preventDefault():b.returnValue=!1})},s=function(a,b,c,d){if(j.panels.stop(!0,!0),n(k,"easytabs:before",[a,b,i])){var e,l,m,o,p=j.panels.filter(":visible"),q=b.parent(),r=window.location.hash.match(/^[^\?]*/)[0];i.animate&&(e=t(b),l=p.length?u(p):0,m=e-l),g=r,o=function(){k.trigger("easytabs:midTransition",[a,b,i]),i.animate&&"fadeIn"==i.transitionIn&&0>m&&q.animate({height:q.height()+m},f.halfSpeed).css({"min-height":""}),i.updateHash&&!h?window.history.pushState?window.history.pushState(null,null,"#"+b.attr("id")):window.location.hash="#"+b.attr("id"):h=!1,b[f.show](f.speed,i.transitionInEasing,function(){q.css({height:"","min-height":""}),k.trigger("easytabs:after",[a,b,i]),"function"==typeof d&&d()})},!c||i.cache&&a.parent().data("easytabs").cached||(k.trigger("easytabs:ajax:beforeSend",[a,b]),b.load(c,function(c,d,e){a.parent().data("easytabs").cached=!0,k.trigger("easytabs:ajax:complete",[a,b,c,d,e])})),i.animate&&"fadeOut"==i.transitionOut&&(m>0?q.animate({height:q.height()+m},f.halfSpeed):q.css({"min-height":q.height()})),j.tabs.filter("."+i.tabActiveClass).removeClass(i.tabActiveClass).children().removeClass(i.tabActiveClass),j.tabs.filter("."+i.collapsedClass).removeClass(i.collapsedClass).children().removeClass(i.collapsedClass),a.parent().addClass(i.tabActiveClass).children().addClass(i.tabActiveClass),j.panels.filter("."+i.panelActiveClass).removeClass(i.panelActiveClass),b.addClass(i.panelActiveClass),p.length?p[f.hide](f.speed,i.transitionOutEasing,o):b[f.uncollapse](f.speed,i.transitionUncollapseEasing,o)}},t=function(b){if(b.data("easytabs")&&b.data("easytabs").lastHeight)return b.data("easytabs").lastHeight;var c,d,e=b.css("display");try{c=a("<div></div>",{position:"absolute",visibility:"hidden",overflow:"hidden"})}catch(f){c=a("<div></div>",{visibility:"hidden",overflow:"hidden"})}return d=b.wrap(c).css({position:"relative",visibility:"hidden",display:"block"}).outerHeight(),b.unwrap(),b.css({position:b.data("easytabs").position,visibility:b.data("easytabs").visibility,display:e}),b.data("easytabs").lastHeight=d,d},u=function(a){var b=a.outerHeight();return a.data("easytabs")?a.data("easytabs").lastHeight=b:a.data("easytabs",{lastHeight:b}),b},v=function(){"function"==typeof a(window).hashchange?a(window).hashchange(function(){j.selectTabFromHashChange()}):a.address&&"function"==typeof a.address.change&&a.address.change(function(){j.selectTabFromHashChange()})},w=function(){var a;i.cycle&&(a=j.tabs.index(d),setTimeout(function(){j.cycleTabs(a+1)},i.cycle))};j.init()},a.fn.easytabs=function(b){var c=arguments;return this.each(function(){var d=a(this),e=d.data("easytabs");return void 0===e&&(e=new a.easytabs(this,b),d.data("easytabs",e)),e.publicMethods[b]?e.publicMethods[b](Array.prototype.slice.call(c,1)):void 0})}}(jQuery),function(a){var b=function(){var b='<div class="colpick"><div class="colpick_color"><div class="colpick_color_overlay1"><div class="colpick_color_overlay2"><div class="colpick_selector_outer"><div class="colpick_selector_inner"></div></div></div></div></div><div class="colpick_hue"><div class="colpick_hue_arrs"><div class="colpick_hue_larr"></div><div class="colpick_hue_rarr"></div></div></div><div class="colpick_new_color"></div><div class="colpick_current_color"></div><div class="colpick_hex_field"><div class="colpick_field_letter">#</div><input type="text" maxlength="6" size="6" /></div><div class="colpick_rgb_r colpick_field"><div class="colpick_field_letter">R</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_rgb_g colpick_field"><div class="colpick_field_letter">G</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_rgb_b colpick_field"><div class="colpick_field_letter">B</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_hsb_h colpick_field"><div class="colpick_field_letter">H</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_hsb_s colpick_field"><div class="colpick_field_letter">S</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_hsb_b colpick_field"><div class="colpick_field_letter">B</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_submit"></div></div>',c={showEvent:"click",onShow:function(){},onBeforeShow:function(){},onHide:function(){},onChange:function(){},onSubmit:function(){},colorScheme:"light",color:"3289c7",livePreview:!0,flat:!1,layout:"full",submit:1,submitText:"OK",height:156},g=function(b,c){var d=f(b);a(c).data("colpick").fields.eq(1).val(d.r).end().eq(2).val(d.g).end().eq(3).val(d.b).end()},i=function(b,c){a(c).data("colpick").fields.eq(4).val(Math.round(b.h)).end().eq(5).val(Math.round(b.s)).end().eq(6).val(Math.round(b.b)).end()},j=function(b,c){a(c).data("colpick").fields.eq(0).val(h(b))},k=function(b,c){a(c).data("colpick").selector.css("backgroundColor","#"+h({h:b.h,s:100,b:100})),a(c).data("colpick").selectorIndic.css({left:parseInt(a(c).data("colpick").height*b.s/100,10),top:parseInt(a(c).data("colpick").height*(100-b.b)/100,10)})},l=function(b,c){a(c).data("colpick").hue.css("top",parseInt(a(c).data("colpick").height-a(c).data("colpick").height*b.h/360,10))},m=function(b,c){a(c).data("colpick").currentColor.css("backgroundColor","#"+h(b))},n=function(b,c){a(c).data("colpick").newColor.css("backgroundColor","#"+h(b))},o=function(){var b,c=a(this).parent().parent();this.parentNode.className.indexOf("_hex")>0?(c.data("colpick").color=b=d(G(this.value)),g(b,c.get(0)),i(b,c.get(0))):this.parentNode.className.indexOf("_hsb")>0?(c.data("colpick").color=b=E({h:parseInt(c.data("colpick").fields.eq(4).val(),10),s:parseInt(c.data("colpick").fields.eq(5).val(),10),b:parseInt(c.data("colpick").fields.eq(6).val(),10)}),g(b,c.get(0)),j(b,c.get(0))):(c.data("colpick").color=b=e(F({r:parseInt(c.data("colpick").fields.eq(1).val(),10),g:parseInt(c.data("colpick").fields.eq(2).val(),10),b:parseInt(c.data("colpick").fields.eq(3).val(),10)})),j(b,c.get(0)),i(b,c.get(0))),k(b,c.get(0)),l(b,c.get(0)),n(b,c.get(0)),c.data("colpick").onChange.apply(c.parent(),[b,h(b),f(b),c.data("colpick").el,0])},p=function(){a(this).parent().removeClass("colpick_focus")},q=function(){a(this).parent().parent().data("colpick").fields.parent().removeClass("colpick_focus"),a(this).parent().addClass("colpick_focus")},r=function(b){b.preventDefault?b.preventDefault():b.returnValue=!1;var c=a(this).parent().find("input").focus(),d={el:a(this).parent().addClass("colpick_slider"),max:this.parentNode.className.indexOf("_hsb_h")>0?360:this.parentNode.className.indexOf("_hsb")>0?100:255,y:b.pageY,field:c,val:parseInt(c.val(),10),preview:a(this).parent().parent().data("colpick").livePreview};a(document).mouseup(d,t),a(document).mousemove(d,s)},s=function(a){return a.data.field.val(Math.max(0,Math.min(a.data.max,parseInt(a.data.val-a.pageY+a.data.y,10)))),a.data.preview&&o.apply(a.data.field.get(0),[!0]),!1},t=function(b){return o.apply(b.data.field.get(0),[!0]),b.data.el.removeClass("colpick_slider").find("input").focus(),a(document).off("mouseup",t),a(document).off("mousemove",s),!1},u=function(b){b.preventDefault?b.preventDefault():b.returnValue=!1;var c={cal:a(this).parent(),y:a(this).offset().top};a(document).on("mouseup touchend",c,w),a(document).on("mousemove touchmove",c,v);var d="touchstart"==b.type?b.originalEvent.changedTouches[0].pageY:b.pageY;return o.apply(c.cal.data("colpick").fields.eq(4).val(parseInt(360*(c.cal.data("colpick").height-(d-c.y))/c.cal.data("colpick").height,10)).get(0),[c.cal.data("colpick").livePreview]),!1},v=function(a){var b="touchmove"==a.type?a.originalEvent.changedTouches[0].pageY:a.pageY;return o.apply(a.data.cal.data("colpick").fields.eq(4).val(parseInt(360*(a.data.cal.data("colpick").height-Math.max(0,Math.min(a.data.cal.data("colpick").height,b-a.data.y)))/a.data.cal.data("colpick").height,10)).get(0),[a.data.preview]),!1},w=function(b){return g(b.data.cal.data("colpick").color,b.data.cal.get(0)),j(b.data.cal.data("colpick").color,b.data.cal.get(0)),a(document).off("mouseup touchend",w),a(document).off("mousemove touchmove",v),!1},x=function(b){b.preventDefault?b.preventDefault():b.returnValue=!1;var c={cal:a(this).parent(),pos:a(this).offset()};c.preview=c.cal.data("colpick").livePreview,a(document).on("mouseup touchend",c,z),a(document).on("mousemove touchmove",c,y);var d;return"touchstart"==b.type?(pageX=b.originalEvent.changedTouches[0].pageX,d=b.originalEvent.changedTouches[0].pageY):(pageX=b.pageX,d=b.pageY),o.apply(c.cal.data("colpick").fields.eq(6).val(parseInt(100*(c.cal.data("colpick").height-(d-c.pos.top))/c.cal.data("colpick").height,10)).end().eq(5).val(parseInt(100*(pageX-c.pos.left)/c.cal.data("colpick").height,10)).get(0),[c.preview]),!1},y=function(a){var b;return"touchmove"==a.type?(pageX=a.originalEvent.changedTouches[0].pageX,b=a.originalEvent.changedTouches[0].pageY):(pageX=a.pageX,b=a.pageY),o.apply(a.data.cal.data("colpick").fields.eq(6).val(parseInt(100*(a.data.cal.data("colpick").height-Math.max(0,Math.min(a.data.cal.data("colpick").height,b-a.data.pos.top)))/a.data.cal.data("colpick").height,10)).end().eq(5).val(parseInt(100*Math.max(0,Math.min(a.data.cal.data("colpick").height,pageX-a.data.pos.left))/a.data.cal.data("colpick").height,10)).get(0),[a.data.preview]),!1},z=function(b){return g(b.data.cal.data("colpick").color,b.data.cal.get(0)),j(b.data.cal.data("colpick").color,b.data.cal.get(0)),a(document).off("mouseup touchend",z),a(document).off("mousemove touchmove",y),!1},A=function(){var b=a(this).parent(),c=b.data("colpick").color;b.data("colpick").origColor=c,m(c,b.get(0)),b.data("colpick").onSubmit(c,h(c),f(c),b.data("colpick").el)},B=function(b){b.stopPropagation();var c=a("#"+a(this).data("colpickId"));c.data("colpick").onBeforeShow.apply(this,[c.get(0)]);var d=a(this).offset(),e=d.top+this.offsetHeight,f=d.left,g=D(),h=c.width();f+h>g.l+g.w&&(f-=h),c.css({left:f+"px",top:e+"px"}),0!=c.data("colpick").onShow.apply(this,[c.get(0)])&&c.show(),a("html").mousedown({cal:c},C),c.mousedown(function(a){a.stopPropagation()})},C=function(b){0!=b.data.cal.data("colpick").onHide.apply(this,[b.data.cal.get(0)])&&b.data.cal.hide(),a("html").off("mousedown",C)},D=function(){var a="CSS1Compat"==document.compatMode;return{l:window.pageXOffset||(a?document.documentElement.scrollLeft:document.body.scrollLeft),w:window.innerWidth||(a?document.documentElement.clientWidth:document.body.clientWidth)}},E=function(a){return{h:Math.min(360,Math.max(0,a.h)),s:Math.min(100,Math.max(0,a.s)),b:Math.min(100,Math.max(0,a.b))}},F=function(a){return{r:Math.min(255,Math.max(0,a.r)),g:Math.min(255,Math.max(0,a.g)),b:Math.min(255,Math.max(0,a.b))}},G=function(a){var b=6-a.length;if(b>0){for(var c=[],d=0;b>d;d++)c.push("0");c.push(a),a=c.join("")}return a},H=function(){var b=a(this).parent(),c=b.data("colpick").origColor;b.data("colpick").color=c,g(c,b.get(0)),j(c,b.get(0)),i(c,b.get(0)),k(c,b.get(0)),l(c,b.get(0)),n(c,b.get(0))};return{init:function(f){if(f=a.extend({},c,f||{}),"string"==typeof f.color)f.color=d(f.color);else if(void 0!=f.color.r&&void 0!=f.color.g&&void 0!=f.color.b)f.color=e(f.color);else{if(void 0==f.color.h||void 0==f.color.s||void 0==f.color.b)return this;f.color=E(f.color)}return this.each(function(){if(!a(this).data("colpickId")){var c=a.extend({},f);c.origColor=f.color;var d="collorpicker_"+parseInt(1e3*Math.random());a(this).data("colpickId",d);var e=a(b).attr("id",d);e.addClass("colpick_"+c.layout+(c.submit?"":" colpick_"+c.layout+"_ns")),"light"!=c.colorScheme&&e.addClass("colpick_"+c.colorScheme),e.find("div.colpick_submit").html(c.submitText).click(A),c.fields=e.find("input").change(o).blur(p).focus(q),e.find("div.colpick_field_arrs").mousedown(r).end().find("div.colpick_current_color").click(H),c.selector=e.find("div.colpick_color").on("mousedown touchstart",x),c.selectorIndic=c.selector.find("div.colpick_selector_outer"),c.el=this,c.hue=e.find("div.colpick_hue_arrs"),huebar=c.hue.parent();var h=navigator.userAgent.toLowerCase(),s="Microsoft Internet Explorer"===navigator.appName,t=s?parseFloat(h.match(/msie ([0-9]{1,}[\.0-9]{0,})/)[1]):0,v=s&&10>t,w=["#ff0000","#ff0080","#ff00ff","#8000ff","#0000ff","#0080ff","#00ffff","#00ff80","#00ff00","#80ff00","#ffff00","#ff8000","#ff0000"];if(v){var y,z;for(y=0;11>=y;y++)z=a("<div></div>").attr("style","height:8.333333%; filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr="+w[y]+", endColorstr="+w[y+1]+'); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='+w[y]+", endColorstr="+w[y+1]+')";'),huebar.append(z)}else stopList=w.join(","),huebar.attr("style","background:-webkit-linear-gradient(top,"+stopList+"); background: -o-linear-gradient(top,"+stopList+"); background: -ms-linear-gradient(top,"+stopList+"); background:-moz-linear-gradient(top,"+stopList+"); -webkit-linear-gradient(top,"+stopList+"); background:linear-gradient(to bottom,"+stopList+"); ");e.find("div.colpick_hue").on("mousedown touchstart",u),c.newColor=e.find("div.colpick_new_color"),c.currentColor=e.find("div.colpick_current_color"),e.data("colpick",c),g(c.color,e.get(0)),i(c.color,e.get(0)),j(c.color,e.get(0)),l(c.color,e.get(0)),k(c.color,e.get(0)),m(c.color,e.get(0)),n(c.color,e.get(0)),c.flat?(e.appendTo(this).show(),e.css({position:"relative",display:"block"})):(e.appendTo(document.body),a(this).on(c.showEvent,B),e.css({position:"absolute"}))}})},showPicker:function(){return this.each(function(){a(this).data("colpickId")&&B.apply(this)})},hidePicker:function(){return this.each(function(){a(this).data("colpickId")&&a("#"+a(this).data("colpickId")).hide()})},setColor:function(b,c){if(c="undefined"==typeof c?1:c,"string"==typeof b)b=d(b);else if(void 0!=b.r&&void 0!=b.g&&void 0!=b.b)b=e(b);else{if(void 0==b.h||void 0==b.s||void 0==b.b)return this;b=E(b)}return this.each(function(){if(a(this).data("colpickId")){var d=a("#"+a(this).data("colpickId"));d.data("colpick").color=b,d.data("colpick").origColor=b,g(b,d.get(0)),i(b,d.get(0)),j(b,d.get(0)),l(b,d.get(0)),k(b,d.get(0)),n(b,d.get(0)),d.data("colpick").onChange.apply(d.parent(),[b,h(b),f(b),d.data("colpick").el,1]),c&&m(b,d.get(0))}})}}}(),c=function(a){var a=parseInt(a.indexOf("#")>-1?a.substring(1):a,16);return{r:a>>16,g:(65280&a)>>8,b:255&a}},d=function(a){return e(c(a))},e=function(a){var b={h:0,s:0,b:0},c=Math.min(a.r,a.g,a.b),d=Math.max(a.r,a.g,a.b),e=d-c;return b.b=d,b.s=0!=d?255*e/d:0,b.h=0!=b.s?a.r==d?(a.g-a.b)/e:a.g==d?2+(a.b-a.r)/e:4+(a.r-a.g)/e:-1,b.h*=60,b.h<0&&(b.h+=360),b.s*=100/255,b.b*=100/255,b},f=function(a){var b={},c=a.h,d=255*a.s/100,e=255*a.b/100;if(0==d)b.r=b.g=b.b=e;else{var f=e,g=(255-d)*e/255,h=(f-g)*(c%60)/60;360==c&&(c=0),60>c?(b.r=f,b.b=g,b.g=g+h):120>c?(b.g=f,b.b=g,b.r=f-h):180>c?(b.g=f,b.r=g,b.b=g+h):240>c?(b.b=f,b.r=g,b.g=f-h):300>c?(b.b=f,b.g=g,b.r=g+h):360>c?(b.r=f,b.g=g,b.b=f-h):(b.r=0,b.g=0,b.b=0)}return{r:Math.round(b.r),g:Math.round(b.g),b:Math.round(b.b)}},g=function(b){var c=[b.r.toString(16),b.g.toString(16),b.b.toString(16)];return a.each(c,function(a,b){1==b.length&&(c[a]="0"+b)}),c.join("")},h=function(a){return g(f(a))};a.fn.extend({colpick:b.init,colpickHide:b.hidePicker,colpickShow:b.showPicker,colpickSetColor:b.setColor}),a.extend({colpick:{rgbToHex:g,rgbToHsb:e,hsbToHex:h,hsbToRgb:f,hexToHsb:d,hexToRgb:c}})}(jQuery),window.twttr=function(a,b,c){var d,e=a.getElementsByTagName(b)[0],f=window.twttr||{};return a.getElementById(c)?f:(d=a.createElement(b),d.id=c,d.src="https://platform.twitter.com/widgets.js",e.parentNode.insertBefore(d,e),f._e=[],f.ready=function(a){f._e.push(a)},f)}(document,"script","twitter-wjs");
1
+ jQuery(document).ready(function(a){function b(){a.ajax("https://graph.facebook.com/v2.7/?id=http://www.google.com&access_token="+a("#mashsb_settings\\[fb_access_token_new\\]").val()).done(function(b){a("#mashsb_token_notice").html("<strong>Token valid:</strong> Facebook share count for http://google.com: "+b.share.share_count),console.log(b)}).fail(function(b){a("#mashsb_token_notice").html('<span style="color:red;"> <strong>Error:</strong> Access Token Invalid!</span>'),console.log(b)})}function c(a,b,c){if(c){var d=new Date;d.setTime(d.getTime()+24*c*60*60*1e3);var e="; expires="+d.toGMTString()}else var e="";document.cookie=a+"="+b+e+"; path=/"}function d(a){for(var b=a+"=",c=document.cookie.split(";"),d=0;d<c.length;d++){for(var e=c[d];" "==e.charAt(0);)e=e.substring(1,e.length);if(0==e.indexOf(b))return e.substring(b.length,e.length)}return null}function e(){var a=jQuery(".mashsb-tabs.active").find("a").attr("href");c("mashsb_active_tab",a)}function f(){var a=d("mashsb_active_tab");return null==a&&(a="#mashsb_settingsgeneral_header"),a}function g(){var a,b;return a=jQuery(".mashsb.nav-tab-wrapper a.nav-tab-active:nth-child(2)"),b=jQuery(".mashsb.nav-tab-wrapper a.nav-tab-active:nth-child(3)"),a.length>0||b.length>0?void 0:f()+"-nav"}a(".mashsb-color-box").each(function(){a(this).colpick({layout:"hex",submit:0,colorScheme:"light",onChange:function(b,c,d,e,f){a(e).css("border-color","#"+c),f||a(e).val(c)}}).keyup(function(){a(this).colpickSetColor(this.value)}),a(this).colpick({layout:"hex",submit:0,colorScheme:"light",onChange:function(b,c,d,e,f){a(e).css("border-color","#"+c),f||a(e).val(c)}}).keyup(function(){a(this).colpickSetColor(this.value)})}),a("#mashsb_verify_fbtoken").on("click",function(c){c.preventDefault(),a("#mashsb_settings\\[fb_access_token_new\\]").val()&&b()}),a("#mashsb_fb_auth").click(function(b){b.preventDefault(),winWidth=520,winHeight=350;var c=screen.height/2-winHeight/2,d=screen.width/2-winWidth/2,e=a(this).attr("href");mashsb_fb_auth=window.open(e,"mashsb_fb_auth","top="+c+",left="+d+",toolbar=0,status=0,width="+winWidth+",height="+winHeight+",resizable=yes")}),a("#mashsb_settings\\[responsive_buttons\\]").attr("checked")?a("#mashsb_settings\\[button_width\\]").closest(".row").css("display","none"):a("#mashsb_settings\\[button_width\\]").closest(".row").fadeIn(300).css("display","table-row"),a("#mashsb_settings\\[responsive_buttons\\]").click(function(){a(this).attr("checked")?a("#mashsb_settings\\[button_width\\]").closest(".row").css("display","none"):a("#mashsb_settings\\[button_width\\]").closest(".row").fadeIn(300).css("display","table-row")}),a(".mashsb-chosen-select").chosen({width:"400px"}),a("#mashsb_settings\\[caching_method\\]").change(function(){"refresh_loading"===a("#mashsb_settings\\[caching_method\\]").val()?a("#mashsb_settings\\[mashsharer_cache\\]").closest(".row").fadeIn(300).css("display","table-row"):a("#mashsb_settings\\[mashsharer_cache\\]").closest(".row").css("display","none")}),"refresh_loading"===a("#mashsb_settings\\[caching_method\\]").val()?a("#mashsb_settings\\[mashsharer_cache\\]").closest(".row").fadeIn(300).css("display","table-row"):a("#mashsb_settings\\[mashsharer_cache\\]").closest(".row").css("display","none"),a(".mashsb-tabs").length&&a("#mashsb_container").easytabs({animate:!0,updateHash:!0,defaultTab:g()}),a("#mashsb_container").bind("easytabs:after",function(){0==jQuery(".mashsb.nav-tab-wrapper a.nav-tab-active:nth-child(2)").length&&e()}),a(".mashtab").length&&a(".tabcontent_container").easytabs({animate:!0}),a("#mashsb_network_list").sortable({items:".mashsb_list_item",opacity:.6,cursor:"move",axis:"y",update:function(){var b=a(this).sortable("serialize")+"&action=mashsb_update_order";a.post(ajaxurl,b,function(){})}}),a(".mashsb-helper").click(function(b){b.preventDefault();var c=a(this),d=a(this).next();a(".mashsb-message").not(d).hide();var e=c.position();d.css(d.hasClass("bottom")?{left:e.left-d.width()/2+"px",top:e.top+c.height()+9+"px"}:{left:e.left+c.width()+9+"px",top:e.top+c.height()/2-18+"px"}),d.toggle(),b.stopPropagation()}),a("body").click(function(){a(".mashsb-message").hide()}),a(".mashsb-message").click(function(a){a.stopPropagation()})}),function(a,b,c){function d(a){return a=a||location.href,"#"+a.replace(/^[^#]*#?(.*)$/,"$1")}var e,f="hashchange",g=document,h=a.event.special,i=g.documentMode,j="on"+f in b&&(i===c||i>7);a.fn[f]=function(a){return a?this.bind(f,a):this.trigger(f)},a.fn[f].delay=50,h[f]=a.extend(h[f],{setup:function(){return j?!1:void a(e.start)},teardown:function(){return j?!1:void a(e.stop)}}),e=function(){function e(){var c=d(),g=n(k);c!==k?(m(k=c,g),a(b).trigger(f)):g!==k&&(location.href=location.href.replace(/#.*/,"")+g),h=setTimeout(e,a.fn[f].delay)}var h,i={},k=d(),l=function(a){return a},m=l,n=l;return i.start=function(){h||e()},i.stop=function(){h&&clearTimeout(h),h=c},a.browser.msie&&!j&&function(){var b,c;i.start=function(){b||(c=a.fn[f].src,c=c&&c+d(),b=a('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){c||m(d()),e()}).attr("src",c||"javascript:0").insertAfter("body")[0].contentWindow,g.onpropertychange=function(){try{"title"===event.propertyName&&(b.document.title=g.title)}catch(a){}})},i.stop=l,n=function(){return d(b.location.href)},m=function(c,d){var e=b.document,h=a.fn[f].domain;c!==d&&(e.title=g.title,e.open(),h&&e.write('<script>document.domain="'+h+'"</script>'),e.close(),b.location.hash=c)}}(),i}()}(jQuery,this),function(a){a.easytabs=function(b,c){var d,e,f,g,h,i,j=this,k=a(b),l={animate:!0,panelActiveClass:"active",tabActiveClass:"active",defaultTab:"li:first-child",animationSpeed:"normal",tabs:"> ul > li",updateHash:!0,cycle:!1,collapsible:!1,collapsedClass:"collapsed",collapsedByDefault:!0,uiTabs:!1,transitionIn:"fadeIn",transitionOut:"fadeOut",transitionInEasing:"swing",transitionOutEasing:"swing",transitionCollapse:"slideUp",transitionUncollapse:"slideDown",transitionCollapseEasing:"swing",transitionUncollapseEasing:"swing",containerClass:"",tabsClass:"",tabClass:"",panelClass:"",cache:!0,event:"click",panelContext:k},m={fast:200,normal:400,slow:600};j.init=function(){j.settings=i=a.extend({},l,c),i.bind_str=i.event+".easytabs",i.uiTabs&&(i.tabActiveClass="ui-tabs-selected",i.containerClass="ui-tabs ui-widget ui-widget-content ui-corner-all",i.tabsClass="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all",i.tabClass="ui-state-default ui-corner-top",i.panelClass="ui-tabs-panel ui-widget-content ui-corner-bottom"),i.collapsible&&void 0!==c.defaultTab&&void 0===c.collpasedByDefault&&(i.collapsedByDefault=!1),"string"==typeof i.animationSpeed&&(i.animationSpeed=m[i.animationSpeed]),a("a.anchor").remove().prependTo("body"),k.data("easytabs",{}),j.setTransitions(),j.getTabs(),o(),p(),r(),v(),w(),k.attr("data-easytabs",!0)},j.setTransitions=function(){f=i.animate?{show:i.transitionIn,hide:i.transitionOut,speed:i.animationSpeed,collapse:i.transitionCollapse,uncollapse:i.transitionUncollapse,halfSpeed:i.animationSpeed/2}:{show:"show",hide:"hide",speed:0,collapse:"hide",uncollapse:"show",halfSpeed:0}},j.getTabs=function(){var b;j.tabs=k.find(i.tabs),j.panels=a(),j.tabs.each(function(){var c=a(this),d=c.children("a"),e=c.children("a").data("target");c.data("easytabs",{}),void 0!==e&&null!==e?c.data("easytabs").ajax=d.attr("href"):e=d.attr("href"),e=e.match(/#([^\?]+)/)[1],b=i.panelContext.find("#"+e),b.length?(b.data("easytabs",{position:b.css("position"),visibility:b.css("visibility")}),b.not(i.panelActiveClass).hide(),j.panels=j.panels.add(b),c.data("easytabs").panel=b):(j.tabs=j.tabs.not(c),"console"in window&&console.warn("Warning: tab without matching panel for selector '#"+e+"' removed from set"))})},j.selectTab=function(a,b){var c=window.location,d=(c.hash.match(/^[^\?]*/)[0],a.parent().data("easytabs").panel),e=a.parent().data("easytabs").ajax;i.collapsible&&!h&&(a.hasClass(i.tabActiveClass)||a.hasClass(i.collapsedClass))?j.toggleTabCollapse(a,d,e,b):a.hasClass(i.tabActiveClass)&&d.hasClass(i.panelActiveClass)?i.cache||s(a,d,e,b):s(a,d,e,b)},j.toggleTabCollapse=function(a,b,c,d){j.panels.stop(!0,!0),n(k,"easytabs:before",[a,b,i])&&(j.tabs.filter("."+i.tabActiveClass).removeClass(i.tabActiveClass).children().removeClass(i.tabActiveClass),a.hasClass(i.collapsedClass)?(!c||i.cache&&a.parent().data("easytabs").cached||(k.trigger("easytabs:ajax:beforeSend",[a,b]),b.load(c,function(c,d,e){a.parent().data("easytabs").cached=!0,k.trigger("easytabs:ajax:complete",[a,b,c,d,e])})),a.parent().removeClass(i.collapsedClass).addClass(i.tabActiveClass).children().removeClass(i.collapsedClass).addClass(i.tabActiveClass),b.addClass(i.panelActiveClass)[f.uncollapse](f.speed,i.transitionUncollapseEasing,function(){k.trigger("easytabs:midTransition",[a,b,i]),"function"==typeof d&&d()})):(a.addClass(i.collapsedClass).parent().addClass(i.collapsedClass),b.removeClass(i.panelActiveClass)[f.collapse](f.speed,i.transitionCollapseEasing,function(){k.trigger("easytabs:midTransition",[a,b,i]),"function"==typeof d&&d()})))},j.matchTab=function(a){return j.tabs.find("[href='"+a+"'],[data-target='"+a+"']").first()},j.matchInPanel=function(a){return a&&j.validId(a)?j.panels.filter(":has("+a+")").first():[]},j.validId=function(a){return a.substr(1).match(/^[A-Za-z][A-Za-z0-9\-_:\.]*$/)},j.selectTabFromHashChange=function(){var a,b=window.location.hash.match(/^[^\?]*/)[0],c=j.matchTab(b);i.updateHash&&(c.length?(h=!0,j.selectTab(c)):(a=j.matchInPanel(b),a.length?(b="#"+a.attr("id"),c=j.matchTab(b),h=!0,j.selectTab(c)):d.hasClass(i.tabActiveClass)||i.cycle||(""===b||j.matchTab(g).length||k.closest(b).length)&&(h=!0,j.selectTab(e))))},j.cycleTabs=function(b){i.cycle&&(b%=j.tabs.length,$tab=a(j.tabs[b]).children("a").first(),h=!0,j.selectTab($tab,function(){setTimeout(function(){j.cycleTabs(b+1)},i.cycle)}))},j.publicMethods={select:function(b){var c;0===(c=j.tabs.filter(b)).length?0===(c=j.tabs.find("a[href='"+b+"']")).length&&0===(c=j.tabs.find("a"+b)).length&&0===(c=j.tabs.find("[data-target='"+b+"']")).length&&0===(c=j.tabs.find("a[href$='"+b+"']")).length&&a.error("Tab '"+b+"' does not exist in tab set"):c=c.children("a").first(),j.selectTab(c)}};var n=function(b,c,d){var e=a.Event(c);return b.trigger(e,d),e.result!==!1},o=function(){k.addClass(i.containerClass),j.tabs.parent().addClass(i.tabsClass),j.tabs.addClass(i.tabClass),j.panels.addClass(i.panelClass)},p=function(){var b,c=window.location.hash.match(/^[^\?]*/)[0],f=j.matchTab(c).parent();1===f.length?(d=f,i.cycle=!1):(b=j.matchInPanel(c),b.length?(c="#"+b.attr("id"),d=j.matchTab(c).parent()):(d=j.tabs.parent().find(i.defaultTab),0===d.length&&a.error("The specified default tab ('"+i.defaultTab+"') could not be found in the tab set ('"+i.tabs+"') out of "+j.tabs.length+" tabs."))),e=d.children("a").first(),q(f)},q=function(b){var c,f;i.collapsible&&0===b.length&&i.collapsedByDefault?d.addClass(i.collapsedClass).children().addClass(i.collapsedClass):(c=a(d.data("easytabs").panel),f=d.data("easytabs").ajax,!f||i.cache&&d.data("easytabs").cached||(k.trigger("easytabs:ajax:beforeSend",[e,c]),c.load(f,function(a,b,f){d.data("easytabs").cached=!0,k.trigger("easytabs:ajax:complete",[e,c,a,b,f])})),d.data("easytabs").panel.show().addClass(i.panelActiveClass),d.addClass(i.tabActiveClass).children().addClass(i.tabActiveClass)),k.trigger("easytabs:initialised",[e,c])},r=function(){j.tabs.children("a").bind(i.bind_str,function(b){i.cycle=!1,h=!1,j.selectTab(a(this)),b.preventDefault?b.preventDefault():b.returnValue=!1})},s=function(a,b,c,d){if(j.panels.stop(!0,!0),n(k,"easytabs:before",[a,b,i])){var e,l,m,o,p=j.panels.filter(":visible"),q=b.parent(),r=window.location.hash.match(/^[^\?]*/)[0];i.animate&&(e=t(b),l=p.length?u(p):0,m=e-l),g=r,o=function(){k.trigger("easytabs:midTransition",[a,b,i]),i.animate&&"fadeIn"==i.transitionIn&&0>m&&q.animate({height:q.height()+m},f.halfSpeed).css({"min-height":""}),i.updateHash&&!h?window.history.pushState?window.history.pushState(null,null,"#"+b.attr("id")):window.location.hash="#"+b.attr("id"):h=!1,b[f.show](f.speed,i.transitionInEasing,function(){q.css({height:"","min-height":""}),k.trigger("easytabs:after",[a,b,i]),"function"==typeof d&&d()})},!c||i.cache&&a.parent().data("easytabs").cached||(k.trigger("easytabs:ajax:beforeSend",[a,b]),b.load(c,function(c,d,e){a.parent().data("easytabs").cached=!0,k.trigger("easytabs:ajax:complete",[a,b,c,d,e])})),i.animate&&"fadeOut"==i.transitionOut&&(m>0?q.animate({height:q.height()+m},f.halfSpeed):q.css({"min-height":q.height()})),j.tabs.filter("."+i.tabActiveClass).removeClass(i.tabActiveClass).children().removeClass(i.tabActiveClass),j.tabs.filter("."+i.collapsedClass).removeClass(i.collapsedClass).children().removeClass(i.collapsedClass),a.parent().addClass(i.tabActiveClass).children().addClass(i.tabActiveClass),j.panels.filter("."+i.panelActiveClass).removeClass(i.panelActiveClass),b.addClass(i.panelActiveClass),p.length?p[f.hide](f.speed,i.transitionOutEasing,o):b[f.uncollapse](f.speed,i.transitionUncollapseEasing,o)}},t=function(b){if(b.data("easytabs")&&b.data("easytabs").lastHeight)return b.data("easytabs").lastHeight;var c,d,e=b.css("display");try{c=a("<div></div>",{position:"absolute",visibility:"hidden",overflow:"hidden"})}catch(f){c=a("<div></div>",{visibility:"hidden",overflow:"hidden"})}return d=b.wrap(c).css({position:"relative",visibility:"hidden",display:"block"}).outerHeight(),b.unwrap(),b.css({position:b.data("easytabs").position,visibility:b.data("easytabs").visibility,display:e}),b.data("easytabs").lastHeight=d,d},u=function(a){var b=a.outerHeight();return a.data("easytabs")?a.data("easytabs").lastHeight=b:a.data("easytabs",{lastHeight:b}),b},v=function(){"function"==typeof a(window).hashchange?a(window).hashchange(function(){j.selectTabFromHashChange()}):a.address&&"function"==typeof a.address.change&&a.address.change(function(){j.selectTabFromHashChange()})},w=function(){var a;i.cycle&&(a=j.tabs.index(d),setTimeout(function(){j.cycleTabs(a+1)},i.cycle))};j.init()},a.fn.easytabs=function(b){var c=arguments;return this.each(function(){var d=a(this),e=d.data("easytabs");return void 0===e&&(e=new a.easytabs(this,b),d.data("easytabs",e)),e.publicMethods[b]?e.publicMethods[b](Array.prototype.slice.call(c,1)):void 0})}}(jQuery),function(a){var b=function(){var b='<div class="colpick"><div class="colpick_color"><div class="colpick_color_overlay1"><div class="colpick_color_overlay2"><div class="colpick_selector_outer"><div class="colpick_selector_inner"></div></div></div></div></div><div class="colpick_hue"><div class="colpick_hue_arrs"><div class="colpick_hue_larr"></div><div class="colpick_hue_rarr"></div></div></div><div class="colpick_new_color"></div><div class="colpick_current_color"></div><div class="colpick_hex_field"><div class="colpick_field_letter">#</div><input type="text" maxlength="6" size="6" /></div><div class="colpick_rgb_r colpick_field"><div class="colpick_field_letter">R</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_rgb_g colpick_field"><div class="colpick_field_letter">G</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_rgb_b colpick_field"><div class="colpick_field_letter">B</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_hsb_h colpick_field"><div class="colpick_field_letter">H</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_hsb_s colpick_field"><div class="colpick_field_letter">S</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_hsb_b colpick_field"><div class="colpick_field_letter">B</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_submit"></div></div>',c={showEvent:"click",onShow:function(){},onBeforeShow:function(){},onHide:function(){},onChange:function(){},onSubmit:function(){},colorScheme:"light",color:"3289c7",livePreview:!0,flat:!1,layout:"full",submit:1,submitText:"OK",height:156},g=function(b,c){var d=f(b);a(c).data("colpick").fields.eq(1).val(d.r).end().eq(2).val(d.g).end().eq(3).val(d.b).end()},i=function(b,c){a(c).data("colpick").fields.eq(4).val(Math.round(b.h)).end().eq(5).val(Math.round(b.s)).end().eq(6).val(Math.round(b.b)).end()},j=function(b,c){a(c).data("colpick").fields.eq(0).val(h(b))},k=function(b,c){a(c).data("colpick").selector.css("backgroundColor","#"+h({h:b.h,s:100,b:100})),a(c).data("colpick").selectorIndic.css({left:parseInt(a(c).data("colpick").height*b.s/100,10),top:parseInt(a(c).data("colpick").height*(100-b.b)/100,10)})},l=function(b,c){a(c).data("colpick").hue.css("top",parseInt(a(c).data("colpick").height-a(c).data("colpick").height*b.h/360,10))},m=function(b,c){a(c).data("colpick").currentColor.css("backgroundColor","#"+h(b))},n=function(b,c){a(c).data("colpick").newColor.css("backgroundColor","#"+h(b))},o=function(){var b,c=a(this).parent().parent();this.parentNode.className.indexOf("_hex")>0?(c.data("colpick").color=b=d(G(this.value)),g(b,c.get(0)),i(b,c.get(0))):this.parentNode.className.indexOf("_hsb")>0?(c.data("colpick").color=b=E({h:parseInt(c.data("colpick").fields.eq(4).val(),10),s:parseInt(c.data("colpick").fields.eq(5).val(),10),b:parseInt(c.data("colpick").fields.eq(6).val(),10)}),g(b,c.get(0)),j(b,c.get(0))):(c.data("colpick").color=b=e(F({r:parseInt(c.data("colpick").fields.eq(1).val(),10),g:parseInt(c.data("colpick").fields.eq(2).val(),10),b:parseInt(c.data("colpick").fields.eq(3).val(),10)})),j(b,c.get(0)),i(b,c.get(0))),k(b,c.get(0)),l(b,c.get(0)),n(b,c.get(0)),c.data("colpick").onChange.apply(c.parent(),[b,h(b),f(b),c.data("colpick").el,0])},p=function(){a(this).parent().removeClass("colpick_focus")},q=function(){a(this).parent().parent().data("colpick").fields.parent().removeClass("colpick_focus"),a(this).parent().addClass("colpick_focus")},r=function(b){b.preventDefault?b.preventDefault():b.returnValue=!1;var c=a(this).parent().find("input").focus(),d={el:a(this).parent().addClass("colpick_slider"),max:this.parentNode.className.indexOf("_hsb_h")>0?360:this.parentNode.className.indexOf("_hsb")>0?100:255,y:b.pageY,field:c,val:parseInt(c.val(),10),preview:a(this).parent().parent().data("colpick").livePreview};a(document).mouseup(d,t),a(document).mousemove(d,s)},s=function(a){return a.data.field.val(Math.max(0,Math.min(a.data.max,parseInt(a.data.val-a.pageY+a.data.y,10)))),a.data.preview&&o.apply(a.data.field.get(0),[!0]),!1},t=function(b){return o.apply(b.data.field.get(0),[!0]),b.data.el.removeClass("colpick_slider").find("input").focus(),a(document).off("mouseup",t),a(document).off("mousemove",s),!1},u=function(b){b.preventDefault?b.preventDefault():b.returnValue=!1;var c={cal:a(this).parent(),y:a(this).offset().top};a(document).on("mouseup touchend",c,w),a(document).on("mousemove touchmove",c,v);var d="touchstart"==b.type?b.originalEvent.changedTouches[0].pageY:b.pageY;return o.apply(c.cal.data("colpick").fields.eq(4).val(parseInt(360*(c.cal.data("colpick").height-(d-c.y))/c.cal.data("colpick").height,10)).get(0),[c.cal.data("colpick").livePreview]),!1},v=function(a){var b="touchmove"==a.type?a.originalEvent.changedTouches[0].pageY:a.pageY;return o.apply(a.data.cal.data("colpick").fields.eq(4).val(parseInt(360*(a.data.cal.data("colpick").height-Math.max(0,Math.min(a.data.cal.data("colpick").height,b-a.data.y)))/a.data.cal.data("colpick").height,10)).get(0),[a.data.preview]),!1},w=function(b){return g(b.data.cal.data("colpick").color,b.data.cal.get(0)),j(b.data.cal.data("colpick").color,b.data.cal.get(0)),a(document).off("mouseup touchend",w),a(document).off("mousemove touchmove",v),!1},x=function(b){b.preventDefault?b.preventDefault():b.returnValue=!1;var c={cal:a(this).parent(),pos:a(this).offset()};c.preview=c.cal.data("colpick").livePreview,a(document).on("mouseup touchend",c,z),a(document).on("mousemove touchmove",c,y);var d;return"touchstart"==b.type?(pageX=b.originalEvent.changedTouches[0].pageX,d=b.originalEvent.changedTouches[0].pageY):(pageX=b.pageX,d=b.pageY),o.apply(c.cal.data("colpick").fields.eq(6).val(parseInt(100*(c.cal.data("colpick").height-(d-c.pos.top))/c.cal.data("colpick").height,10)).end().eq(5).val(parseInt(100*(pageX-c.pos.left)/c.cal.data("colpick").height,10)).get(0),[c.preview]),!1},y=function(a){var b;return"touchmove"==a.type?(pageX=a.originalEvent.changedTouches[0].pageX,b=a.originalEvent.changedTouches[0].pageY):(pageX=a.pageX,b=a.pageY),o.apply(a.data.cal.data("colpick").fields.eq(6).val(parseInt(100*(a.data.cal.data("colpick").height-Math.max(0,Math.min(a.data.cal.data("colpick").height,b-a.data.pos.top)))/a.data.cal.data("colpick").height,10)).end().eq(5).val(parseInt(100*Math.max(0,Math.min(a.data.cal.data("colpick").height,pageX-a.data.pos.left))/a.data.cal.data("colpick").height,10)).get(0),[a.data.preview]),!1},z=function(b){return g(b.data.cal.data("colpick").color,b.data.cal.get(0)),j(b.data.cal.data("colpick").color,b.data.cal.get(0)),a(document).off("mouseup touchend",z),a(document).off("mousemove touchmove",y),!1},A=function(){var b=a(this).parent(),c=b.data("colpick").color;b.data("colpick").origColor=c,m(c,b.get(0)),b.data("colpick").onSubmit(c,h(c),f(c),b.data("colpick").el)},B=function(b){b.stopPropagation();var c=a("#"+a(this).data("colpickId"));c.data("colpick").onBeforeShow.apply(this,[c.get(0)]);var d=a(this).offset(),e=d.top+this.offsetHeight,f=d.left,g=D(),h=c.width();f+h>g.l+g.w&&(f-=h),c.css({left:f+"px",top:e+"px"}),0!=c.data("colpick").onShow.apply(this,[c.get(0)])&&c.show(),a("html").mousedown({cal:c},C),c.mousedown(function(a){a.stopPropagation()})},C=function(b){0!=b.data.cal.data("colpick").onHide.apply(this,[b.data.cal.get(0)])&&b.data.cal.hide(),a("html").off("mousedown",C)},D=function(){var a="CSS1Compat"==document.compatMode;return{l:window.pageXOffset||(a?document.documentElement.scrollLeft:document.body.scrollLeft),w:window.innerWidth||(a?document.documentElement.clientWidth:document.body.clientWidth)}},E=function(a){return{h:Math.min(360,Math.max(0,a.h)),s:Math.min(100,Math.max(0,a.s)),b:Math.min(100,Math.max(0,a.b))}},F=function(a){return{r:Math.min(255,Math.max(0,a.r)),g:Math.min(255,Math.max(0,a.g)),b:Math.min(255,Math.max(0,a.b))}},G=function(a){var b=6-a.length;if(b>0){for(var c=[],d=0;b>d;d++)c.push("0");c.push(a),a=c.join("")}return a},H=function(){var b=a(this).parent(),c=b.data("colpick").origColor;b.data("colpick").color=c,g(c,b.get(0)),j(c,b.get(0)),i(c,b.get(0)),k(c,b.get(0)),l(c,b.get(0)),n(c,b.get(0))};return{init:function(f){if(f=a.extend({},c,f||{}),"string"==typeof f.color)f.color=d(f.color);else if(void 0!=f.color.r&&void 0!=f.color.g&&void 0!=f.color.b)f.color=e(f.color);else{if(void 0==f.color.h||void 0==f.color.s||void 0==f.color.b)return this;f.color=E(f.color)}return this.each(function(){if(!a(this).data("colpickId")){var c=a.extend({},f);c.origColor=f.color;var d="collorpicker_"+parseInt(1e3*Math.random());a(this).data("colpickId",d);var e=a(b).attr("id",d);e.addClass("colpick_"+c.layout+(c.submit?"":" colpick_"+c.layout+"_ns")),"light"!=c.colorScheme&&e.addClass("colpick_"+c.colorScheme),e.find("div.colpick_submit").html(c.submitText).click(A),c.fields=e.find("input").change(o).blur(p).focus(q),e.find("div.colpick_field_arrs").mousedown(r).end().find("div.colpick_current_color").click(H),c.selector=e.find("div.colpick_color").on("mousedown touchstart",x),c.selectorIndic=c.selector.find("div.colpick_selector_outer"),c.el=this,c.hue=e.find("div.colpick_hue_arrs"),huebar=c.hue.parent();var h=navigator.userAgent.toLowerCase(),s="Microsoft Internet Explorer"===navigator.appName,t=s?parseFloat(h.match(/msie ([0-9]{1,}[\.0-9]{0,})/)[1]):0,v=s&&10>t,w=["#ff0000","#ff0080","#ff00ff","#8000ff","#0000ff","#0080ff","#00ffff","#00ff80","#00ff00","#80ff00","#ffff00","#ff8000","#ff0000"];if(v){var y,z;for(y=0;11>=y;y++)z=a("<div></div>").attr("style","height:8.333333%; filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr="+w[y]+", endColorstr="+w[y+1]+'); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='+w[y]+", endColorstr="+w[y+1]+')";'),huebar.append(z)}else stopList=w.join(","),huebar.attr("style","background:-webkit-linear-gradient(top,"+stopList+"); background: -o-linear-gradient(top,"+stopList+"); background: -ms-linear-gradient(top,"+stopList+"); background:-moz-linear-gradient(top,"+stopList+"); -webkit-linear-gradient(top,"+stopList+"); background:linear-gradient(to bottom,"+stopList+"); ");e.find("div.colpick_hue").on("mousedown touchstart",u),c.newColor=e.find("div.colpick_new_color"),c.currentColor=e.find("div.colpick_current_color"),e.data("colpick",c),g(c.color,e.get(0)),i(c.color,e.get(0)),j(c.color,e.get(0)),l(c.color,e.get(0)),k(c.color,e.get(0)),m(c.color,e.get(0)),n(c.color,e.get(0)),c.flat?(e.appendTo(this).show(),e.css({position:"relative",display:"block"})):(e.appendTo(document.body),a(this).on(c.showEvent,B),e.css({position:"absolute"}))}})},showPicker:function(){return this.each(function(){a(this).data("colpickId")&&B.apply(this)})},hidePicker:function(){return this.each(function(){a(this).data("colpickId")&&a("#"+a(this).data("colpickId")).hide()})},setColor:function(b,c){if(c="undefined"==typeof c?1:c,"string"==typeof b)b=d(b);else if(void 0!=b.r&&void 0!=b.g&&void 0!=b.b)b=e(b);else{if(void 0==b.h||void 0==b.s||void 0==b.b)return this;b=E(b)}return this.each(function(){if(a(this).data("colpickId")){var d=a("#"+a(this).data("colpickId"));d.data("colpick").color=b,d.data("colpick").origColor=b,g(b,d.get(0)),i(b,d.get(0)),j(b,d.get(0)),l(b,d.get(0)),k(b,d.get(0)),n(b,d.get(0)),d.data("colpick").onChange.apply(d.parent(),[b,h(b),f(b),d.data("colpick").el,1]),c&&m(b,d.get(0))}})}}}(),c=function(a){var a=parseInt(a.indexOf("#")>-1?a.substring(1):a,16);return{r:a>>16,g:(65280&a)>>8,b:255&a}},d=function(a){return e(c(a))},e=function(a){var b={h:0,s:0,b:0},c=Math.min(a.r,a.g,a.b),d=Math.max(a.r,a.g,a.b),e=d-c;return b.b=d,b.s=0!=d?255*e/d:0,b.h=0!=b.s?a.r==d?(a.g-a.b)/e:a.g==d?2+(a.b-a.r)/e:4+(a.r-a.g)/e:-1,b.h*=60,b.h<0&&(b.h+=360),b.s*=100/255,b.b*=100/255,b},f=function(a){var b={},c=a.h,d=255*a.s/100,e=255*a.b/100;if(0==d)b.r=b.g=b.b=e;else{var f=e,g=(255-d)*e/255,h=(f-g)*(c%60)/60;360==c&&(c=0),60>c?(b.r=f,b.b=g,b.g=g+h):120>c?(b.g=f,b.b=g,b.r=f-h):180>c?(b.g=f,b.r=g,b.b=g+h):240>c?(b.b=f,b.r=g,b.g=f-h):300>c?(b.b=f,b.g=g,b.r=g+h):360>c?(b.r=f,b.g=g,b.b=f-h):(b.r=0,b.g=0,b.b=0)}return{r:Math.round(b.r),g:Math.round(b.g),b:Math.round(b.b)}},g=function(b){var c=[b.r.toString(16),b.g.toString(16),b.b.toString(16)];return a.each(c,function(a,b){1==b.length&&(c[a]="0"+b)}),c.join("")},h=function(a){return g(f(a))};a.fn.extend({colpick:b.init,colpickHide:b.hidePicker,colpickShow:b.showPicker,colpickSetColor:b.setColor}),a.extend({colpick:{rgbToHex:g,rgbToHsb:e,hsbToHex:h,hsbToRgb:f,hexToHsb:d,hexToRgb:c}})}(jQuery),window.twttr=function(a,b,c){var d,e=a.getElementsByTagName(b)[0],f=window.twttr||{};return a.getElementById(c)?f:(d=a.createElement(b),d.id=c,d.src="https://platform.twitter.com/widgets.js",e.parentNode.insertBefore(d,e),f._e=[],f.ready=function(a){f._e.push(a)},f)}(document,"script","twitter-wjs");
assets/js/mashsb.js CHANGED
@@ -54,7 +54,6 @@ jQuery(document).ready(function ($) {
54
 
55
  // Fix for the inline post plugin which removes the zero share count
56
  if ($('.mashsbcount').text() == ''){
57
- console.log('test');
58
  $('.mashsbcount').text(0);
59
  }
60
 
@@ -66,7 +65,6 @@ jQuery(document).ready(function ($) {
66
  setTimeout(function () {
67
  if (typeof(mashsb) && mashsb.refresh == "1") {
68
  mashsb_update_cache();
69
- //console.log('Cache will be updated');
70
  }
71
 
72
  }, 6000);
@@ -133,7 +131,6 @@ jQuery(document).ready(function ($) {
133
  }
134
  var xhr = new XMLHttpRequest();
135
  xhr.open("GET", mashsb_url, true);
136
- //console.log('Update Cache');
137
  xhr.send();
138
  }
139
 
@@ -249,14 +246,12 @@ jQuery(document).ready(function ($) {
249
  var listenerContainer = $(".mashsb-container.mashsb-main .mashsb-count");
250
  if (listenerContainer.length){
251
  new ResizeSensor(listenerContainer, function () {
252
- console.log('go calc shares');
253
  calculate();
254
  });
255
  }
256
  var listenerViews = $(".mashsb-container.mashsb-main .mashpv .count");
257
  if (listenerViews.length){
258
  new ResizeSensor(listenerViews, function () {
259
- console.log('go calc views');
260
  calculate();
261
  });
262
  }
@@ -284,10 +279,8 @@ jQuery(document).ready(function ($) {
284
 
285
  // Re-calculate the width of the buttons on Get View ajax call
286
  if (action === "mashpv_get_views") {
287
- console.log("Get views is called");
288
  // Adjust for animation
289
  setTimeout(function() {
290
- console.log("calling calculate");
291
  //calculate();
292
  }, 1100);
293
  }
@@ -503,7 +496,6 @@ jQuery(document).ready(function ($) {
503
  // We need to get precise width of the container, jQuery's width() is rounding up the numbers
504
  averageWidth = ($container[0].getBoundingClientRect().width - totalUsedWidth) / primaryButtons.length;
505
  if (isNaN(averageWidth)) {
506
- console.log("Couldn't calculate average width");
507
  return;
508
  }
509
 
54
 
55
  // Fix for the inline post plugin which removes the zero share count
56
  if ($('.mashsbcount').text() == ''){
 
57
  $('.mashsbcount').text(0);
58
  }
59
 
65
  setTimeout(function () {
66
  if (typeof(mashsb) && mashsb.refresh == "1") {
67
  mashsb_update_cache();
 
68
  }
69
 
70
  }, 6000);
131
  }
132
  var xhr = new XMLHttpRequest();
133
  xhr.open("GET", mashsb_url, true);
 
134
  xhr.send();
135
  }
136
 
246
  var listenerContainer = $(".mashsb-container.mashsb-main .mashsb-count");
247
  if (listenerContainer.length){
248
  new ResizeSensor(listenerContainer, function () {
 
249
  calculate();
250
  });
251
  }
252
  var listenerViews = $(".mashsb-container.mashsb-main .mashpv .count");
253
  if (listenerViews.length){
254
  new ResizeSensor(listenerViews, function () {
 
255
  calculate();
256
  });
257
  }
279
 
280
  // Re-calculate the width of the buttons on Get View ajax call
281
  if (action === "mashpv_get_views") {
 
282
  // Adjust for animation
283
  setTimeout(function() {
 
284
  //calculate();
285
  }, 1100);
286
  }
496
  // We need to get precise width of the container, jQuery's width() is rounding up the numbers
497
  averageWidth = ($container[0].getBoundingClientRect().width - totalUsedWidth) / primaryButtons.length;
498
  if (isNaN(averageWidth)) {
 
499
  return;
500
  }
501
 
assets/js/mashsb.min.js CHANGED
@@ -1 +1 @@
1
- var strict;!function(a,b){a.fn.nearest=function(c){function d(b){f=f?f.add(b):a(b)}var e,f,g,h,i,j=b.querySelectorAll;return this.each(function(){e=this,a.each(c.split(","),function(){if(h=a.trim(this),h.indexOf("#"))for(i=e.parentNode;i;){if(g=j?i.querySelectorAll(h):a(i).find(h),g.length){d(g);break}i=i.parentNode}else d(j?b.querySelectorAll(h):a(h))})}),f||a()}}(jQuery,document),jQuery(document).ready(function(a){function b(){setTimeout(function(){"1"==mashsb.refresh&&c()},6e3)}function c(){var a=window.location.href;a+=a.indexOf("?")>-1?"&mashsb-refresh":"?mashsb-refresh";var b=new XMLHttpRequest;b.open("GET",a,!0),b.send()}function d(a){if("undefined"!=typeof mashsb&&1==mashsb.round_shares){if(a>1e6)return shares=Math.round(a/1e6*10)/10+"M",shares;if(a>1e3)return shares=Math.round(a/1e3*10)/10+"k",shares}return a.toFixed(0)}b(),""==a(".mashsbcount").text()&&(console.log("test"),a(".mashsbcount").text(0)),a(".onoffswitch").on("click",function(){var b=a(this).parents(".mashsb-container");b.find(".onoffswitch").hide(),b.find(".secondary-shares").show(),b.find(".onoffswitch2").show()}),a(".onoffswitch2").on("click",function(){var b=a(this).parents(".mashsb-container");b.find(".onoffswitch").show(),b.find(".secondary-shares").hide()}),"undefined"==typeof lashare_fb&&"undefined"!=typeof mashsb&&a(".mashicon-facebook").click(function(b){winWidth=520,winHeight=550;var c=screen.height/2-winHeight/2,d=screen.width/2-winWidth/2,e=a(this).attr("href");return window.open(e,"sharer","top="+c+",left="+d+",toolbar=0,status=0,width="+winWidth+",height="+winHeight),b.preventDefault(b),!1}),"undefined"!=typeof mashsb&&a(".mashicon-twitter").click(function(b){winWidth=520,winHeight=350;var c=screen.height/2-winHeight/2,d=screen.width/2-winWidth/2,e=a(this).attr("href");return"1"===mashsb.twitter_popup&&window.open(e,"sharer","top="+c+",left="+d+",toolbar=0,status=0,width="+winWidth+",height="+winHeight),b.preventDefault(),!1}),"undefined"!=typeof mashsb&&"content"===mashsb.subscribe&&(a(".mashicon-subscribe").not(".trigger_active").nearest(".mashsb-toggle-container").hide(),a(".mashicon-subscribe").click(function(){var b=a(this);return b.hasClass("trigger_active")?(a(b).nearest(".mashsb-toggle-container").slideToggle("fast"),b.removeClass("trigger_active")):(a(".trigger_active").nearest(".mashsb-toggle-container").slideToggle("slow"),a(".trigger_active").removeClass("trigger_active"),a(b).nearest(".mashsb-toggle-container").slideToggle("fast"),b.addClass("trigger_active")),!1})),"undefined"!=typeof mashsb&&"link"===mashsb.subscribe&&a(".mashicon-subscribe").click(function(){var b=mashsb.subscribe_url;a(this).attr("href",b)}),function(a){a.fn.countTo=function(b){return b=b||{},a(this).each(function(){function c(){k+=g,j++,d(k),"function"==typeof e.onUpdate&&e.onUpdate.call(h,k),j>=f&&(i.removeData("countTo"),clearInterval(l.interval),k=e.to,"function"==typeof e.onComplete&&e.onComplete.call(h,k))}function d(a){var b=e.formatter.call(h,a,e);i.text(b)}var e=a.extend({},a.fn.countTo.defaults,{from:a(this).data("from"),to:a(this).data("to"),speed:a(this).data("speed"),refreshInterval:a(this).data("refresh-interval"),decimals:a(this).data("decimals")},b),f=Math.ceil(e.speed/e.refreshInterval),g=(e.to-e.from)/f,h=this,i=a(this),j=0,k=e.from,l=i.data("countTo")||{};i.data("countTo",l),l.interval&&clearInterval(l.interval),l.interval=setInterval(c,e.refreshInterval),d(k)})},a.fn.countTo.defaults={from:0,to:0,speed:1e3,refreshInterval:100,decimals:0,formatter:d,onUpdate:null,onComplete:null}}(jQuery),"undefined"!=typeof mashsb&&1==mashsb.animate_shares&&a(".mashsbcount").length&&a(".mashsbcount").countTo({from:0,to:mashsb.shares,speed:1e3,refreshInterval:100})}),function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.ResizeSensor=b()}(this,function(){function a(a,b){var c=Object.prototype.toString.call(a),d="[object Array]"===c||"[object NodeList]"===c||"[object HTMLCollection]"===c||"undefined"!=typeof jQuery&&a instanceof jQuery||"undefined"!=typeof Elements&&a instanceof Elements,e=0,f=a.length;if(d)for(;f>e;e++)b(a[e]);else b(a)}var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},c=function(d,e){function f(){var a=[];this.add=function(b){a.push(b)};var b,c;this.call=function(){for(b=0,c=a.length;c>b;b++)a[b].call()},this.remove=function(d){var e=[];for(b=0,c=a.length;c>b;b++)a[b]!==d&&e.push(a[b]);a=e},this.length=function(){return a.length}}function g(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function h(a,c){if(a.resizedAttached){if(a.resizedAttached)return void a.resizedAttached.add(c)}else a.resizedAttached=new f,a.resizedAttached.add(c);a.resizeSensor=document.createElement("div"),a.resizeSensor.className="resize-sensor";var d="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;",e="position: absolute; left: 0; top: 0; transition: 0s;";a.resizeSensor.style.cssText=d,a.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="'+d+'"><div style="'+e+'"></div></div><div class="resize-sensor-shrink" style="'+d+'"><div style="'+e+' width: 200%; height: 200%"></div></div>',a.appendChild(a.resizeSensor),"static"==g(a,"position")&&(a.style.position="relative");var h=a.resizeSensor.childNodes[0],i=h.childNodes[0],j=a.resizeSensor.childNodes[1],k=function(){i.style.width=1e5+"px",i.style.height=1e5+"px",h.scrollLeft=1e5,h.scrollTop=1e5,j.scrollLeft=1e5,j.scrollTop=1e5};k();var l=!1,m=function(){a.resizedAttached&&(l&&(a.resizedAttached.call(),l=!1),b(m))};b(m);var n,o,p,q,r=function(){((p=a.offsetWidth)!=n||(q=a.offsetHeight)!=o)&&(l=!0,n=p,o=q),k()},s=function(a,b,c){a.attachEvent?a.attachEvent("on"+b,c):a.addEventListener(b,c)};s(h,"scroll",r),s(j,"scroll",r)}a(d,function(a){h(a,e)}),this.detach=function(a){c.detach(d,a)}};return c.detach=function(b,c){a(b,function(a){a.resizedAttached&&"function"==typeof c&&(a.resizedAttached.remove(c),a.resizedAttached.length())||a.resizeSensor&&(a.contains(a.resizeSensor)&&a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)})},c});
1
+ var strict;!function(a,b){a.fn.nearest=function(c){function d(b){f=f?f.add(b):a(b)}var e,f,g,h,i,j=b.querySelectorAll;return this.each(function(){e=this,a.each(c.split(","),function(){if(h=a.trim(this),h.indexOf("#"))for(i=e.parentNode;i;){if(g=j?i.querySelectorAll(h):a(i).find(h),g.length){d(g);break}i=i.parentNode}else d(j?b.querySelectorAll(h):a(h))})}),f||a()}}(jQuery,document),jQuery(document).ready(function(a){function b(){setTimeout(function(){"1"==mashsb.refresh&&c()},6e3)}function c(){var a=window.location.href;a+=a.indexOf("?")>-1?"&mashsb-refresh":"?mashsb-refresh";var b=new XMLHttpRequest;b.open("GET",a,!0),b.send()}function d(a){if("undefined"!=typeof mashsb&&1==mashsb.round_shares){if(a>1e6)return shares=Math.round(a/1e6*10)/10+"M",shares;if(a>1e3)return shares=Math.round(a/1e3*10)/10+"k",shares}return a.toFixed(0)}b(),""==a(".mashsbcount").text()&&a(".mashsbcount").text(0),a(".onoffswitch").on("click",function(){var b=a(this).parents(".mashsb-container");b.find(".onoffswitch").hide(),b.find(".secondary-shares").show(),b.find(".onoffswitch2").show()}),a(".onoffswitch2").on("click",function(){var b=a(this).parents(".mashsb-container");b.find(".onoffswitch").show(),b.find(".secondary-shares").hide()}),"undefined"==typeof lashare_fb&&"undefined"!=typeof mashsb&&a(".mashicon-facebook").click(function(b){winWidth=520,winHeight=550;var c=screen.height/2-winHeight/2,d=screen.width/2-winWidth/2,e=a(this).attr("href");return window.open(e,"sharer","top="+c+",left="+d+",toolbar=0,status=0,width="+winWidth+",height="+winHeight),b.preventDefault(b),!1}),"undefined"!=typeof mashsb&&a(".mashicon-twitter").click(function(b){winWidth=520,winHeight=350;var c=screen.height/2-winHeight/2,d=screen.width/2-winWidth/2,e=a(this).attr("href");return"1"===mashsb.twitter_popup&&window.open(e,"sharer","top="+c+",left="+d+",toolbar=0,status=0,width="+winWidth+",height="+winHeight),b.preventDefault(),!1}),"undefined"!=typeof mashsb&&"content"===mashsb.subscribe&&(a(".mashicon-subscribe").not(".trigger_active").nearest(".mashsb-toggle-container").hide(),a(".mashicon-subscribe").click(function(){var b=a(this);return b.hasClass("trigger_active")?(a(b).nearest(".mashsb-toggle-container").slideToggle("fast"),b.removeClass("trigger_active")):(a(".trigger_active").nearest(".mashsb-toggle-container").slideToggle("slow"),a(".trigger_active").removeClass("trigger_active"),a(b).nearest(".mashsb-toggle-container").slideToggle("fast"),b.addClass("trigger_active")),!1})),"undefined"!=typeof mashsb&&"link"===mashsb.subscribe&&a(".mashicon-subscribe").click(function(){var b=mashsb.subscribe_url;a(this).attr("href",b)}),function(a){a.fn.countTo=function(b){return b=b||{},a(this).each(function(){function c(){k+=g,j++,d(k),"function"==typeof e.onUpdate&&e.onUpdate.call(h,k),j>=f&&(i.removeData("countTo"),clearInterval(l.interval),k=e.to,"function"==typeof e.onComplete&&e.onComplete.call(h,k))}function d(a){var b=e.formatter.call(h,a,e);i.text(b)}var e=a.extend({},a.fn.countTo.defaults,{from:a(this).data("from"),to:a(this).data("to"),speed:a(this).data("speed"),refreshInterval:a(this).data("refresh-interval"),decimals:a(this).data("decimals")},b),f=Math.ceil(e.speed/e.refreshInterval),g=(e.to-e.from)/f,h=this,i=a(this),j=0,k=e.from,l=i.data("countTo")||{};i.data("countTo",l),l.interval&&clearInterval(l.interval),l.interval=setInterval(c,e.refreshInterval),d(k)})},a.fn.countTo.defaults={from:0,to:0,speed:1e3,refreshInterval:100,decimals:0,formatter:d,onUpdate:null,onComplete:null}}(jQuery),"undefined"!=typeof mashsb&&1==mashsb.animate_shares&&a(".mashsbcount").length&&a(".mashsbcount").countTo({from:0,to:mashsb.shares,speed:1e3,refreshInterval:100})}),function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.ResizeSensor=b()}(this,function(){function a(a,b){var c=Object.prototype.toString.call(a),d="[object Array]"===c||"[object NodeList]"===c||"[object HTMLCollection]"===c||"undefined"!=typeof jQuery&&a instanceof jQuery||"undefined"!=typeof Elements&&a instanceof Elements,e=0,f=a.length;if(d)for(;f>e;e++)b(a[e]);else b(a)}var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},c=function(d,e){function f(){var a=[];this.add=function(b){a.push(b)};var b,c;this.call=function(){for(b=0,c=a.length;c>b;b++)a[b].call()},this.remove=function(d){var e=[];for(b=0,c=a.length;c>b;b++)a[b]!==d&&e.push(a[b]);a=e},this.length=function(){return a.length}}function g(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function h(a,c){if(a.resizedAttached){if(a.resizedAttached)return void a.resizedAttached.add(c)}else a.resizedAttached=new f,a.resizedAttached.add(c);a.resizeSensor=document.createElement("div"),a.resizeSensor.className="resize-sensor";var d="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;",e="position: absolute; left: 0; top: 0; transition: 0s;";a.resizeSensor.style.cssText=d,a.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="'+d+'"><div style="'+e+'"></div></div><div class="resize-sensor-shrink" style="'+d+'"><div style="'+e+' width: 200%; height: 200%"></div></div>',a.appendChild(a.resizeSensor),"static"==g(a,"position")&&(a.style.position="relative");var h=a.resizeSensor.childNodes[0],i=h.childNodes[0],j=a.resizeSensor.childNodes[1],k=function(){i.style.width=1e5+"px",i.style.height=1e5+"px",h.scrollLeft=1e5,h.scrollTop=1e5,j.scrollLeft=1e5,j.scrollTop=1e5};k();var l=!1,m=function(){a.resizedAttached&&(l&&(a.resizedAttached.call(),l=!1),b(m))};b(m);var n,o,p,q,r=function(){((p=a.offsetWidth)!=n||(q=a.offsetHeight)!=o)&&(l=!0,n=p,o=q),k()},s=function(a,b,c){a.attachEvent?a.attachEvent("on"+b,c):a.addEventListener(b,c)};s(h,"scroll",r),s(j,"scroll",r)}a(d,function(a){h(a,e)}),this.detach=function(a){c.detach(d,a)}};return c.detach=function(b,c){a(b,function(a){a.resizedAttached&&"function"==typeof c&&(a.resizedAttached.remove(c),a.resizedAttached.length())||a.resizeSensor&&(a.contains(a.resizeSensor)&&a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)})},c});
includes/admin/admin-notices.php CHANGED
@@ -421,8 +421,11 @@ function mashsbGetRemainingRateLimitTime() {
421
  function mashsb_is_invalid_fb_api_key(){
422
  global $mashsb_options;
423
 
424
- $status = get_option('mashsb_valid_fb_api_key');
 
 
425
 
 
426
  if (false === $status || 'success' === $status){
427
  return false;
428
  } else {
421
  function mashsb_is_invalid_fb_api_key(){
422
  global $mashsb_options;
423
 
424
+ if (empty($mashsb_options['fb_access_token_new'])){
425
+ return false;
426
+ }
427
 
428
+ $status = get_option('mashsb_valid_fb_api_key');
429
  if (false === $status || 'success' === $status){
430
  return false;
431
  } else {
includes/helper.php CHANGED
@@ -17,7 +17,7 @@ function mashecho($string){
17
  * @return boolean true when it is installed
18
  */
19
  function mashsb_curl_installed(){
20
- if(function_exists('curl_init') && function_exists('curl_multi_init')){
21
  return true;
22
  }
23
 
17
  * @return boolean true when it is installed
18
  */
19
  function mashsb_curl_installed(){
20
+ if(function_exists('curl_init') && function_exists('curl_multi_init') && function_exists('curl_multi_exec') ){
21
  return true;
22
  }
23
 
includes/mashengine.php CHANGED
@@ -204,13 +204,18 @@ class mashengine {
204
  if( isset( $mashsb_options['cumulate_http_https'] ) ) {
205
  $RollingCurlX->addRequest( "http://public.newsharecounts.com/count.json?url=" . $this->https_scheme_url, $post_data, array($this, 'getCount'), array('twitter'), $headers );
206
  $RollingCurlX->addRequest( "http://public.newsharecounts.com/count.json?url=" . $this->http_scheme_url, $post_data, array($this, 'getCount'), array('twitter'), $headers );
 
 
 
 
207
  } else {
208
  $RollingCurlX->addRequest( "http://public.newsharecounts.com/count.json?url=" . $this->url, $post_data, array($this, 'getCount'), array('twitter'), $headers );
 
 
209
  }
 
210
  $RollingCurlX->addRequest( "https://www.linkedin.com/countserv/count/share?format=json&url=" . $this->url, $post_data, array($this, 'getCount'), array('linkedin'), $headers );
211
  $RollingCurlX->addRequest( "http://www.stumbleupon.com/services/1.01/badge.getinfo?url=" . $this->url, $post_data, array($this, 'getCount'), array('stumbleupon'), $headers );
212
- $RollingCurlX->addRequest( "https://plusone.google.com/_/+1/fastbutton?url=" . $this->url, $post_data, array($this, 'getCount'), array('google'), $headers );
213
- $RollingCurlX->addRequest( "http://api.pinterest.com/v1/urls/count.json?url=" . $this->url, $post_data, array($this, 'getCount'), array('pinterest'), $headers );
214
  $RollingCurlX->addRequest( "https://api.bufferapp.com/1/links/shares.json?url=" . $this->url, $post_data, array($this, 'getCount'), array('buffer'), $headers );
215
  $RollingCurlX->addRequest( "https://vk.com/share.php?act=count&index=1&url=" . $this->url, $post_data, array($this, 'getCount'), array('vk'), $headers );
216
 
204
  if( isset( $mashsb_options['cumulate_http_https'] ) ) {
205
  $RollingCurlX->addRequest( "http://public.newsharecounts.com/count.json?url=" . $this->https_scheme_url, $post_data, array($this, 'getCount'), array('twitter'), $headers );
206
  $RollingCurlX->addRequest( "http://public.newsharecounts.com/count.json?url=" . $this->http_scheme_url, $post_data, array($this, 'getCount'), array('twitter'), $headers );
207
+ $RollingCurlX->addRequest( "https://plusone.google.com/_/+1/fastbutton?url=" . $this->http_scheme_url, $post_data, array($this, 'getCount'), array('google'), $headers );
208
+ $RollingCurlX->addRequest( "https://plusone.google.com/_/+1/fastbutton?url=" . $this->https_scheme_url, $post_data, array($this, 'getCount'), array('google'), $headers );
209
+ $RollingCurlX->addRequest( "http://api.pinterest.com/v1/urls/count.json?url=" . $this->http_scheme_url, $post_data, array($this, 'getCount'), array('pinterest'), $headers );
210
+ $RollingCurlX->addRequest( "http://api.pinterest.com/v1/urls/count.json?url=" . $this->https_scheme_url, $post_data, array($this, 'getCount'), array('pinterest'), $headers );
211
  } else {
212
  $RollingCurlX->addRequest( "http://public.newsharecounts.com/count.json?url=" . $this->url, $post_data, array($this, 'getCount'), array('twitter'), $headers );
213
+ $RollingCurlX->addRequest( "https://plusone.google.com/_/+1/fastbutton?url=" . $this->url, $post_data, array($this, 'getCount'), array('google'), $headers );
214
+ $RollingCurlX->addRequest( "http://api.pinterest.com/v1/urls/count.json?url=" . $this->url, $post_data, array($this, 'getCount'), array('pinterest'), $headers );
215
  }
216
+
217
  $RollingCurlX->addRequest( "https://www.linkedin.com/countserv/count/share?format=json&url=" . $this->url, $post_data, array($this, 'getCount'), array('linkedin'), $headers );
218
  $RollingCurlX->addRequest( "http://www.stumbleupon.com/services/1.01/badge.getinfo?url=" . $this->url, $post_data, array($this, 'getCount'), array('stumbleupon'), $headers );
 
 
219
  $RollingCurlX->addRequest( "https://api.bufferapp.com/1/links/shares.json?url=" . $this->url, $post_data, array($this, 'getCount'), array('buffer'), $headers );
220
  $RollingCurlX->addRequest( "https://vk.com/share.php?act=count&index=1&url=" . $this->url, $post_data, array($this, 'getCount'), array('vk'), $headers );
221
 
includes/sharecount-functions.php CHANGED
@@ -35,13 +35,17 @@ function mashsb_rate_limit_exceeded(){
35
  function mashsb_is_req_limited() {
36
  global $mashsb_error;
37
 
38
- if (false === get_transient('mashsb_limit_req')) {
 
 
 
 
 
39
  set_transient('mashsb_limit_req', '1', 25);
40
  $mashsb_error[] = 'MashShare: Temp Rate Limit not exceeded';
41
  return false;
42
  }
43
  $mashsb_error[] = 'MashShare: Temp Rate Limit Exceeded';
44
- MASHSB()->logger->info('MashShare: Temp Rate Limit Exceeded');
45
  return true;
46
 
47
  }
35
  function mashsb_is_req_limited() {
36
  global $mashsb_error;
37
 
38
+ $data_timeout = get_option('_transient_timeout_mashsb_limit_req');
39
+
40
+ // Rewrite this because wordpress sometimes does not store the expiration value so we need to check this value first
41
+ //if (false === get_transient('mashsb_limit_req')) {
42
+
43
+ if (false === $data_timeout || empty($data_timeout) || $data_timeout < time() ){
44
  set_transient('mashsb_limit_req', '1', 25);
45
  $mashsb_error[] = 'MashShare: Temp Rate Limit not exceeded';
46
  return false;
47
  }
48
  $mashsb_error[] = 'MashShare: Temp Rate Limit Exceeded';
 
49
  return true;
50
 
51
  }
includes/template-functions.php CHANGED
@@ -376,10 +376,10 @@ function arrNetworks( $name, $is_shortcode ) {
376
  $via = mashsb_get_twitter_username() ? '&via=' . mashsb_get_twitter_username() : '';
377
 
378
  $networks_arr = array(
379
- 'facebook' => 'http://www.facebook.com/sharer.php?u=' . $url,
380
  'twitter' => 'https://twitter.com/intent/tweet?text=' . $twitter_title . '&url=' . $mashsb_twitter_url . $via,
381
  'subscribe' => '#',
382
- 'url' => $url,
383
  'title' => $title
384
  );
385
 
@@ -1203,4 +1203,20 @@ function mashsb_get_document_title() {
1203
 
1204
  $title = html_entity_decode($title, ENT_QUOTES, 'UTF-8');
1205
  return $title;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1206
  }
376
  $via = mashsb_get_twitter_username() ? '&via=' . mashsb_get_twitter_username() : '';
377
 
378
  $networks_arr = array(
379
+ 'facebook' => 'https://www.facebook.com/sharer.php?u=' . mashsb_append_tracking_param($url, 'facebook'),
380
  'twitter' => 'https://twitter.com/intent/tweet?text=' . $twitter_title . '&url=' . $mashsb_twitter_url . $via,
381
  'subscribe' => '#',
382
+ 'url' => mashsb_append_tracking_param($url),
383
  'title' => $title
384
  );
385
 
1203
 
1204
  $title = html_entity_decode($title, ENT_QUOTES, 'UTF-8');
1205
  return $title;
1206
+ }
1207
+
1208
+ /**
1209
+ * Append tracking parameter to shared url
1210
+ *
1211
+ * @param string $url
1212
+ * @return string
1213
+ */
1214
+ function mashsb_append_tracking_param($url, $network = 'mashshare'){
1215
+ global $mashsb_options;
1216
+
1217
+ if (!isset($mashsb_options['tracking_params'])){
1218
+ return $url;
1219
+ }
1220
+
1221
+ return $url . urlencode('?utm_source=sharebuttons&utm_medium='.$network.'&utm_campaign=mashshare');
1222
  }
mashshare.php CHANGED
@@ -6,7 +6,7 @@
6
  * Description: Mashshare is a Share functionality inspired by the the great website Mashable for Facebook and Twitter. More networks available.
7
  * Author: René Hermenau
8
  * Author URI: https://www.mashshare.net
9
- * Version: 3.3.9
10
  * Text Domain: mashsb
11
  * Domain Path: /languages
12
  * Credits: Thanks go to Pippin Williamson and the edd team. When we started with Mashshare we decided to use the EDD code base and
@@ -37,7 +37,7 @@ if( !defined( 'ABSPATH' ) )
37
 
38
  // Plugin version
39
  if( !defined( 'MASHSB_VERSION' ) ) {
40
- define( 'MASHSB_VERSION', '3.3.9' );
41
  }
42
 
43
  // Debug mode
6
  * Description: Mashshare is a Share functionality inspired by the the great website Mashable for Facebook and Twitter. More networks available.
7
  * Author: René Hermenau
8
  * Author URI: https://www.mashshare.net
9
+ * Version: 3.4.0
10
  * Text Domain: mashsb
11
  * Domain Path: /languages
12
  * Credits: Thanks go to Pippin Williamson and the edd team. When we started with Mashshare we decided to use the EDD code base and
37
 
38
  // Plugin version
39
  if( !defined( 'MASHSB_VERSION' ) ) {
40
+ define( 'MASHSB_VERSION', '3.4.0' );
41
  }
42
 
43
  // Debug mode
readme.txt CHANGED
@@ -9,7 +9,7 @@ License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Tags: Share buttons, Social Sharing, social media, Facebook, Twitter, Subscribe, Traffic posts, pages, widget, social share buttons, analytics, email
10
  Requires at least: 3.6+
11
  Tested up to: 4.7.3
12
- Stable tag: 3.3.9
13
 
14
  Social Media Share Buttons for Twitter, Facebook and other social networks. Highly customizable Social Media ecosystem
15
 
@@ -316,6 +316,15 @@ Read here more FAQ: [https://www.mashshare.net/faq/](https://www.mashshare.net/f
316
 
317
  == Changelog ==
318
 
 
 
 
 
 
 
 
 
 
319
  = 3.3.9 =
320
  * New: Create filters to allow customizing the refresh times
321
  * Fix: Sporadic connection issues in post editor
9
  Tags: Share buttons, Social Sharing, social media, Facebook, Twitter, Subscribe, Traffic posts, pages, widget, social share buttons, analytics, email
10
  Requires at least: 3.6+
11
  Tested up to: 4.7.3
12
+ Stable tag: 3.4.0
13
 
14
  Social Media Share Buttons for Twitter, Facebook and other social networks. Highly customizable Social Media ecosystem
15
 
316
 
317
  == Changelog ==
318
 
319
+ = 3.4.0 =
320
+ * New: Google Analytics add-on allows to append utm_source tracking params for traffic tracking with google Analytics
321
+ * Fix: Pinterest and google plus share counts are not cummulated together with http/https option
322
+ * Fix: Remove admin notice if Facebook access token is empty
323
+ * Fix: Remove console.log test notice
324
+ * Fix: Check if multi_curl_exec is allowed
325
+ * Fix: Share count not incrementing if transient mashsb_limit_req expiration is not set. (Caused by Possible WP Bug or custom theme transient filter)
326
+ * Tweak: Use https endpoint for facebook sharing url
327
+
328
  = 3.3.9 =
329
  * New: Create filters to allow customizing the refresh times
330
  * Fix: Sporadic connection issues in post editor