Social Media Share Buttons | MashShare - Version 3.4.4

Version Description

  • Fix: Check fb access token not working properly
Download this release

Release Info

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

Code changes from version 3.4.5 to 3.4.4

assets/js/ElementQueries.js ADDED
@@ -0,0 +1,515 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Copyright Marc J. Schmidt. See the LICENSE file at the top-level
3
+ * directory of this distribution and at
4
+ * https://github.com/marcj/css-element-queries/blob/master/LICENSE.
5
+ */
6
+ ;
7
+ (function (root, factory) {
8
+ if (typeof define === "function" && define.amd) {
9
+ define(['./ResizeSensor.js'], factory);
10
+ } else if (typeof exports === "object") {
11
+ module.exports = factory(require('./ResizeSensor.js'));
12
+ } else {
13
+ root.ElementQueries = factory(root.ResizeSensor);
14
+ }
15
+ }(this, function (ResizeSensor) {
16
+
17
+ /**
18
+ *
19
+ * @type {Function}
20
+ * @constructor
21
+ */
22
+ var ElementQueries = function() {
23
+
24
+ var trackingActive = false;
25
+ var elements = [];
26
+
27
+ /**
28
+ *
29
+ * @param element
30
+ * @returns {Number}
31
+ */
32
+ function getEmSize(element) {
33
+ if (!element) {
34
+ element = document.documentElement;
35
+ }
36
+ var fontSize = window.getComputedStyle(element, null).fontSize;
37
+ return parseFloat(fontSize) || 16;
38
+ }
39
+
40
+ /**
41
+ *
42
+ * @copyright https://github.com/Mr0grog/element-query/blob/master/LICENSE
43
+ *
44
+ * @param {HTMLElement} element
45
+ * @param {*} value
46
+ * @returns {*}
47
+ */
48
+ function convertToPx(element, value) {
49
+ var numbers = value.split(/\d/);
50
+ var units = numbers[numbers.length-1];
51
+ value = parseFloat(value);
52
+ switch (units) {
53
+ case "px":
54
+ return value;
55
+ case "em":
56
+ return value * getEmSize(element);
57
+ case "rem":
58
+ return value * getEmSize();
59
+ // Viewport units!
60
+ // According to http://quirksmode.org/mobile/tableViewport.html
61
+ // documentElement.clientWidth/Height gets us the most reliable info
62
+ case "vw":
63
+ return value * document.documentElement.clientWidth / 100;
64
+ case "vh":
65
+ return value * document.documentElement.clientHeight / 100;
66
+ case "vmin":
67
+ case "vmax":
68
+ var vw = document.documentElement.clientWidth / 100;
69
+ var vh = document.documentElement.clientHeight / 100;
70
+ var chooser = Math[units === "vmin" ? "min" : "max"];
71
+ return value * chooser(vw, vh);
72
+ default:
73
+ return value;
74
+ // for now, not supporting physical units (since they are just a set number of px)
75
+ // or ex/ch (getting accurate measurements is hard)
76
+ }
77
+ }
78
+
79
+ /**
80
+ *
81
+ * @param {HTMLElement} element
82
+ * @constructor
83
+ */
84
+ function SetupInformation(element) {
85
+ this.element = element;
86
+ this.options = {};
87
+ var key, option, width = 0, height = 0, value, actualValue, attrValues, attrValue, attrName;
88
+
89
+ /**
90
+ * @param {Object} option {mode: 'min|max', property: 'width|height', value: '123px'}
91
+ */
92
+ this.addOption = function(option) {
93
+ var idx = [option.mode, option.property, option.value].join(',');
94
+ this.options[idx] = option;
95
+ };
96
+
97
+ var attributes = ['min-width', 'min-height', 'max-width', 'max-height'];
98
+
99
+ /**
100
+ * Extracts the computed width/height and sets to min/max- attribute.
101
+ */
102
+ this.call = function() {
103
+ // extract current dimensions
104
+ width = this.element.offsetWidth;
105
+ height = this.element.offsetHeight;
106
+
107
+ attrValues = {};
108
+
109
+ for (key in this.options) {
110
+ if (!this.options.hasOwnProperty(key)){
111
+ continue;
112
+ }
113
+ option = this.options[key];
114
+
115
+ value = convertToPx(this.element, option.value);
116
+
117
+ actualValue = option.property == 'width' ? width : height;
118
+ attrName = option.mode + '-' + option.property;
119
+ attrValue = '';
120
+
121
+ if (option.mode == 'min' && actualValue >= value) {
122
+ attrValue += option.value;
123
+ }
124
+
125
+ if (option.mode == 'max' && actualValue <= value) {
126
+ attrValue += option.value;
127
+ }
128
+
129
+ if (!attrValues[attrName]) attrValues[attrName] = '';
130
+ if (attrValue && -1 === (' '+attrValues[attrName]+' ').indexOf(' ' + attrValue + ' ')) {
131
+ attrValues[attrName] += ' ' + attrValue;
132
+ }
133
+ }
134
+
135
+ for (var k in attributes) {
136
+ if(!attributes.hasOwnProperty(k)) continue;
137
+
138
+ if (attrValues[attributes[k]]) {
139
+ this.element.setAttribute(attributes[k], attrValues[attributes[k]].substr(1));
140
+ } else {
141
+ this.element.removeAttribute(attributes[k]);
142
+ }
143
+ }
144
+ };
145
+ }
146
+
147
+ /**
148
+ * @param {HTMLElement} element
149
+ * @param {Object} options
150
+ */
151
+ function setupElement(element, options) {
152
+ if (element.elementQueriesSetupInformation) {
153
+ element.elementQueriesSetupInformation.addOption(options);
154
+ } else {
155
+ element.elementQueriesSetupInformation = new SetupInformation(element);
156
+ element.elementQueriesSetupInformation.addOption(options);
157
+ element.elementQueriesSensor = new ResizeSensor(element, function() {
158
+ element.elementQueriesSetupInformation.call();
159
+ });
160
+ }
161
+ element.elementQueriesSetupInformation.call();
162
+
163
+ if (trackingActive && elements.indexOf(element) < 0) {
164
+ elements.push(element);
165
+ }
166
+ }
167
+
168
+ /**
169
+ * @param {String} selector
170
+ * @param {String} mode min|max
171
+ * @param {String} property width|height
172
+ * @param {String} value
173
+ */
174
+ var allQueries = {};
175
+ function queueQuery(selector, mode, property, value) {
176
+ if (typeof(allQueries[mode]) == 'undefined') allQueries[mode] = {};
177
+ if (typeof(allQueries[mode][property]) == 'undefined') allQueries[mode][property] = {};
178
+ if (typeof(allQueries[mode][property][value]) == 'undefined') allQueries[mode][property][value] = selector;
179
+ else allQueries[mode][property][value] += ','+selector;
180
+ }
181
+
182
+ function getQuery() {
183
+ var query;
184
+ if (document.querySelectorAll) query = document.querySelectorAll.bind(document);
185
+ if (!query && 'undefined' !== typeof $$) query = $$;
186
+ if (!query && 'undefined' !== typeof jQuery) query = jQuery;
187
+
188
+ if (!query) {
189
+ throw 'No document.querySelectorAll, jQuery or Mootools\'s $$ found.';
190
+ }
191
+
192
+ return query;
193
+ }
194
+
195
+ /**
196
+ * Start the magic. Go through all collected rules (readRules()) and attach the resize-listener.
197
+ */
198
+ function findElementQueriesElements() {
199
+ var query = getQuery();
200
+
201
+ for (var mode in allQueries) if (allQueries.hasOwnProperty(mode)) {
202
+
203
+ for (var property in allQueries[mode]) if (allQueries[mode].hasOwnProperty(property)) {
204
+ for (var value in allQueries[mode][property]) if (allQueries[mode][property].hasOwnProperty(value)) {
205
+ var elements = query(allQueries[mode][property][value]);
206
+ for (var i = 0, j = elements.length; i < j; i++) {
207
+ setupElement(elements[i], {
208
+ mode: mode,
209
+ property: property,
210
+ value: value
211
+ });
212
+ }
213
+ }
214
+ }
215
+
216
+ }
217
+ }
218
+
219
+ /**
220
+ *
221
+ * @param {HTMLElement} element
222
+ */
223
+ function attachResponsiveImage(element) {
224
+ var children = [];
225
+ var rules = [];
226
+ var sources = [];
227
+ var defaultImageId = 0;
228
+ var lastActiveImage = -1;
229
+ var loadedImages = [];
230
+
231
+ for (var i in element.children) {
232
+ if(!element.children.hasOwnProperty(i)) continue;
233
+
234
+ if (element.children[i].tagName && element.children[i].tagName.toLowerCase() === 'img') {
235
+ children.push(element.children[i]);
236
+
237
+ var minWidth = element.children[i].getAttribute('min-width') || element.children[i].getAttribute('data-min-width');
238
+ //var minHeight = element.children[i].getAttribute('min-height') || element.children[i].getAttribute('data-min-height');
239
+ var src = element.children[i].getAttribute('data-src') || element.children[i].getAttribute('url');
240
+
241
+ sources.push(src);
242
+
243
+ var rule = {
244
+ minWidth: minWidth
245
+ };
246
+
247
+ rules.push(rule);
248
+
249
+ if (!minWidth) {
250
+ defaultImageId = children.length - 1;
251
+ element.children[i].style.display = 'block';
252
+ } else {
253
+ element.children[i].style.display = 'none';
254
+ }
255
+ }
256
+ }
257
+
258
+ lastActiveImage = defaultImageId;
259
+
260
+ function check() {
261
+ var imageToDisplay = false, i;
262
+
263
+ for (i in children){
264
+ if(!children.hasOwnProperty(i)) continue;
265
+
266
+ if (rules[i].minWidth) {
267
+ if (element.offsetWidth > rules[i].minWidth) {
268
+ imageToDisplay = i;
269
+ }
270
+ }
271
+ }
272
+
273
+ if (!imageToDisplay) {
274
+ //no rule matched, show default
275
+ imageToDisplay = defaultImageId;
276
+ }
277
+
278
+ if (lastActiveImage != imageToDisplay) {
279
+ //image change
280
+
281
+ if (!loadedImages[imageToDisplay]){
282
+ //image has not been loaded yet, we need to load the image first in memory to prevent flash of
283
+ //no content
284
+
285
+ var image = new Image();
286
+ image.onload = function() {
287
+ children[imageToDisplay].src = sources[imageToDisplay];
288
+
289
+ children[lastActiveImage].style.display = 'none';
290
+ children[imageToDisplay].style.display = 'block';
291
+
292
+ loadedImages[imageToDisplay] = true;
293
+
294
+ lastActiveImage = imageToDisplay;
295
+ };
296
+
297
+ image.src = sources[imageToDisplay];
298
+ } else {
299
+ children[lastActiveImage].style.display = 'none';
300
+ children[imageToDisplay].style.display = 'block';
301
+ lastActiveImage = imageToDisplay;
302
+ }
303
+ } else {
304
+ //make sure for initial check call the .src is set correctly
305
+ children[imageToDisplay].src = sources[imageToDisplay];
306
+ }
307
+ }
308
+
309
+ element.resizeSensor = new ResizeSensor(element, check);
310
+ check();
311
+
312
+ if (trackingActive) {
313
+ elements.push(element);
314
+ }
315
+ }
316
+
317
+ function findResponsiveImages(){
318
+ var query = getQuery();
319
+
320
+ var elements = query('[data-responsive-image],[responsive-image]');
321
+ for (var i = 0, j = elements.length; i < j; i++) {
322
+ attachResponsiveImage(elements[i]);
323
+ }
324
+ }
325
+
326
+ var regex = /,?[\s\t]*([^,\n]*?)((?:\[[\s\t]*?(?:min|max)-(?:width|height)[\s\t]*?[~$\^]?=[\s\t]*?"[^"]*?"[\s\t]*?])+)([^,\n\s\{]*)/mgi;
327
+ var attrRegex = /\[[\s\t]*?(min|max)-(width|height)[\s\t]*?[~$\^]?=[\s\t]*?"([^"]*?)"[\s\t]*?]/mgi;
328
+ /**
329
+ * @param {String} css
330
+ */
331
+ function extractQuery(css) {
332
+ var match;
333
+ var smatch;
334
+ css = css.replace(/'/g, '"');
335
+ while (null !== (match = regex.exec(css))) {
336
+ smatch = match[1] + match[3];
337
+ attrs = match[2];
338
+
339
+ while (null !== (attrMatch = attrRegex.exec(attrs))) {
340
+ queueQuery(smatch, attrMatch[1], attrMatch[2], attrMatch[3]);
341
+ }
342
+ }
343
+ }
344
+
345
+ /**
346
+ * @param {CssRule[]|String} rules
347
+ */
348
+ function readRules(rules) {
349
+ var selector = '';
350
+ if (!rules) {
351
+ return;
352
+ }
353
+ if ('string' === typeof rules) {
354
+ rules = rules.toLowerCase();
355
+ if (-1 !== rules.indexOf('min-width') || -1 !== rules.indexOf('max-width')) {
356
+ extractQuery(rules);
357
+ }
358
+ } else {
359
+ for (var i = 0, j = rules.length; i < j; i++) {
360
+ if (1 === rules[i].type) {
361
+ selector = rules[i].selectorText || rules[i].cssText;
362
+ if (-1 !== selector.indexOf('min-height') || -1 !== selector.indexOf('max-height')) {
363
+ extractQuery(selector);
364
+ }else if(-1 !== selector.indexOf('min-width') || -1 !== selector.indexOf('max-width')) {
365
+ extractQuery(selector);
366
+ }
367
+ } else if (4 === rules[i].type) {
368
+ readRules(rules[i].cssRules || rules[i].rules);
369
+ }
370
+ }
371
+ }
372
+ }
373
+
374
+ var defaultCssInjected = false;
375
+
376
+ /**
377
+ * Searches all css rules and setups the event listener to all elements with element query rules..
378
+ *
379
+ * @param {Boolean} withTracking allows and requires you to use detach, since we store internally all used elements
380
+ * (no garbage collection possible if you don not call .detach() first)
381
+ */
382
+ this.init = function(withTracking) {
383
+ trackingActive = typeof withTracking === 'undefined' ? false : withTracking;
384
+
385
+ for (var i = 0, j = document.styleSheets.length; i < j; i++) {
386
+ try {
387
+ readRules(document.styleSheets[i].cssRules || document.styleSheets[i].rules || document.styleSheets[i].cssText);
388
+ } catch(e) {
389
+ if (e.name !== 'SecurityError') {
390
+ throw e;
391
+ }
392
+ }
393
+ }
394
+
395
+ if (!defaultCssInjected) {
396
+ var style = document.createElement('style');
397
+ style.type = 'text/css';
398
+ style.innerHTML = '[responsive-image] > img, [data-responsive-image] {overflow: hidden; padding: 0; } [responsive-image] > img, [data-responsive-image] > img { width: 100%;}';
399
+ document.getElementsByTagName('head')[0].appendChild(style);
400
+ defaultCssInjected = true;
401
+ }
402
+
403
+ findElementQueriesElements();
404
+ findResponsiveImages();
405
+ };
406
+
407
+ /**
408
+ *
409
+ * @param {Boolean} withTracking allows and requires you to use detach, since we store internally all used elements
410
+ * (no garbage collection possible if you don not call .detach() first)
411
+ */
412
+ this.update = function(withTracking) {
413
+ this.init(withTracking);
414
+ };
415
+
416
+ this.detach = function() {
417
+ if (!this.withTracking) {
418
+ throw 'withTracking is not enabled. We can not detach elements since we don not store it.' +
419
+ 'Use ElementQueries.withTracking = true; before domready or call ElementQueryes.update(true).';
420
+ }
421
+
422
+ var element;
423
+ while (element = elements.pop()) {
424
+ ElementQueries.detach(element);
425
+ }
426
+
427
+ elements = [];
428
+ };
429
+ };
430
+
431
+ /**
432
+ *
433
+ * @param {Boolean} withTracking allows and requires you to use detach, since we store internally all used elements
434
+ * (no garbage collection possible if you don not call .detach() first)
435
+ */
436
+ ElementQueries.update = function(withTracking) {
437
+ ElementQueries.instance.update(withTracking);
438
+ };
439
+
440
+ /**
441
+ * Removes all sensor and elementquery information from the element.
442
+ *
443
+ * @param {HTMLElement} element
444
+ */
445
+ ElementQueries.detach = function(element) {
446
+ if (element.elementQueriesSetupInformation) {
447
+ //element queries
448
+ element.elementQueriesSensor.detach();
449
+ delete element.elementQueriesSetupInformation;
450
+ delete element.elementQueriesSensor;
451
+
452
+ } else if (element.resizeSensor) {
453
+ //responsive image
454
+
455
+ element.resizeSensor.detach();
456
+ delete element.resizeSensor;
457
+ } else {
458
+ //console.log('detached already', element);
459
+ }
460
+ };
461
+
462
+ ElementQueries.withTracking = false;
463
+
464
+ ElementQueries.init = function() {
465
+ if (!ElementQueries.instance) {
466
+ ElementQueries.instance = new ElementQueries();
467
+ }
468
+
469
+ ElementQueries.instance.init(ElementQueries.withTracking);
470
+ };
471
+
472
+ var domLoaded = function (callback) {
473
+ /* Internet Explorer */
474
+ /*@cc_on
475
+ @if (@_win32 || @_win64)
476
+ document.write('<script id="ieScriptLoad" defer src="//:"><\/script>');
477
+ document.getElementById('ieScriptLoad').onreadystatechange = function() {
478
+ if (this.readyState == 'complete') {
479
+ callback();
480
+ }
481
+ };
482
+ @end @*/
483
+ /* Mozilla, Chrome, Opera */
484
+ if (document.addEventListener) {
485
+ document.addEventListener('DOMContentLoaded', callback, false);
486
+ }
487
+ /* Safari, iCab, Konqueror */
488
+ else if (/KHTML|WebKit|iCab/i.test(navigator.userAgent)) {
489
+ var DOMLoadTimer = setInterval(function () {
490
+ if (/loaded|complete/i.test(document.readyState)) {
491
+ callback();
492
+ clearInterval(DOMLoadTimer);
493
+ }
494
+ }, 10);
495
+ }
496
+ /* Other web browsers */
497
+ else window.onload = callback;
498
+ };
499
+
500
+ ElementQueries.listen = function() {
501
+ domLoaded(ElementQueries.init);
502
+ };
503
+
504
+ // make available to common module loader
505
+ if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
506
+ module.exports = ElementQueries;
507
+ }
508
+ else {
509
+ window.ElementQueries = ElementQueries;
510
+ ElementQueries.listen();
511
+ }
512
+
513
+ return ElementQueries;
514
+
515
+ }));
assets/js/mashsb-admin.js CHANGED
@@ -47,27 +47,18 @@ jQuery(document).ready(function ($) {
47
  function check_access_token()
48
  {
49
  $.ajax("https://graph.facebook.com/v2.7/?id=http://www.google.com&access_token=" + $('#mashsb_settings\\[fb_access_token_new\\]').val())
50
- .done(function (e) {
51
-
52
- try {
53
- if (e.share.share_count) {
54
- $('#mashsb_token_notice').html('<strong>Token valid:</strong> Facebook share count for http://google.com: ' + e.share.share_count )
55
- }
56
- } catch(e) {
57
- $('#mashsb_token_notice').html('<span style="color:red;"> <strong>Error:</strong> Access Token Invalid!</span>');
58
- }
59
- //
60
- // console.log(e);
61
- // if (e.share.share_count && "undefined" !== typeof (e.share.share_count)){
62
- // $('#mashsb_token_notice').html('<strong>Token valid:</strong> Facebook share count for http://google.com: ' + e.share.share_count );
63
- // } else {
64
- // $('#mashsb_token_notice').html('<span style="color:red;"> <strong>Error:</strong> Access Token Invalid!</span>');
65
- // //console.log(e);
66
- // }
67
- // })
68
- // .fail(function (e) {
69
- // $('#mashsb_token_notice').html('<span style="color:red;"> <strong>Error:</strong> Access Token Invalid!</span>');
70
- // //console.log(e);
71
  })
72
  }
73
 
47
  function check_access_token()
48
  {
49
  $.ajax("https://graph.facebook.com/v2.7/?id=http://www.google.com&access_token=" + $('#mashsb_settings\\[fb_access_token_new\\]').val())
50
+ .done(function (e) {
51
+ console.log(e.share.share_count);
52
+ if ("undefined" === typeof (e.share.share_count)){
53
+ $('#mashsb_token_notice').html('<span style="color:red;"> <strong>Error:</strong> Access Token Invalid!</span>');
54
+ } else {
55
+ $('#mashsb_token_notice').html('<strong>Token valid:</strong> Facebook share count for http://google.com: ' + e.share.share_count );
56
+ //console.log(e);
57
+ }
58
+ })
59
+ .fail(function (e) {
60
+ $('#mashsb_token_notice').html('<span style="color:red;"> <strong>Error:</strong> Access Token Invalid!</span>');
61
+ //console.log(e);
 
 
 
 
 
 
 
 
 
62
  })
63
  }
64
 
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){try{b.share.share_count&&a("#mashsb_token_notice").html("<strong>Token valid:</strong> Facebook share count for http://google.com: "+b.share.share_count)}catch(b){a("#mashsb_token_notice").html('<span style="color:red;"> <strong>Error:</strong> Access Token Invalid!</span>')}})}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");
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){console.log(b.share.share_count),a("#mashsb_token_notice").html("undefined"==typeof b.share.share_count?'<span style="color:red;"> <strong>Error:</strong> Access Token Invalid!</span>':"<strong>Token valid:</strong> Facebook share count for http://google.com: "+b.share.share_count)}).fail(function(){a("#mashsb_token_notice").html('<span style="color:red;"> <strong>Error:</strong> Access Token Invalid!</span>')})}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
@@ -1,97 +1,60 @@
1
  var strict;
2
 
3
- jQuery(document).ready(function ($) {
4
-
5
- /* Show Whatsapp button on mobile devices iPhones and Android only */
6
- if(navigator.userAgent.match(/(iPhone)/i) || navigator.userAgent.match(/(Android)/i)){
7
- $('.mashicon-whatsapp').show();
8
- }
9
-
10
- // pinterest button logic
11
- $('body')
12
- .off('click', '.mashicon-pinterest')
13
- .on('click', '.mashicon-pinterest', function (e) {
14
- e.preventDefault();
15
- console.log('preventDefault:' + e);
16
- winWidth = 520;
17
- winHeight = 350;
18
- var winTop = (screen.height / 2) - (winHeight / 2);
19
- var winLeft = (screen.width / 2) - (winWidth / 2);
20
- var url = $(this).attr('data-mashsb-url');
21
-
22
- window.open(url, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight + ',resizable=yes');
23
 
24
- });
25
-
26
- /* Load Pinterest Popup window
27
- *
28
- * @param string html container
29
- * @returns void
30
- */
31
- function load_pinterest(html) {
32
 
33
- mashnet_load_pinterest_body();
 
34
 
35
- jQuery('.mashnet_pinterest_header').fadeIn(500);
36
- jQuery('.mashnet_pinterest_inner').html(html);
37
 
38
- /* Close Pinterest popup*/
39
- jQuery('.mashnet_pinterest_close').click(function (e) {
40
- e.preventDefault();
41
- jQuery('.mashnet_pinterest_header').hide();
 
 
 
 
 
 
 
 
 
 
 
 
42
  });
43
- }
44
 
45
- /**
46
- * Load pinterest wrapper
47
- *
48
- * @returns voids
49
- */
50
- function load_pinterest_body() {
51
- var winWidth = window.innerWidth;
52
- var popupWidth = 350;
53
- var popupHeight = 310;
54
-
55
- /* Load Pinterest popup into body of page */
56
- if (winWidth <= 330)
57
- var popupWidth = 310;
58
- if (winWidth > 400)
59
- var popupWidth = 390;
60
- if (winWidth > 500)
61
- var popupWidth = 490;
62
-
63
- var winTop = (window.innerHeight / 2) - (popupHeight / 2);
64
- var winLeft = (window.innerWidth / 2) - (popupWidth / 2);
65
- var struct = '<div class="mashnet_pinterest_header" style="position:fixed;z-index:999999;max-width:' + popupWidth + 'px; margin-left:' + winLeft + 'px;top:' + winTop + 'px;">\n\
66
- <div class="mashnet_pinit_wrapper" style="background-color:white;"><span class="mashnet_pin_it">Pin it! </span><span class="mashnet_pinicon"></span> \n\
67
- <div class="mashnet_pinterest_close" style="float:right;"><a href="#">X</a></div></div>\n\
68
- <div class="mashnet_pinterest_inner"></div>\n\
69
- </div>\n\
70
- ';
71
-
72
- jQuery('body').append(struct);
73
- }
74
-
75
- /* Get all images on site
76
- *
77
- * @return html
78
- * */
79
- function get_images(url) {
80
 
81
- var allImages = jQuery('img').not("[nopin='nopin']");
82
- var html = '';
83
- var url = '';
84
 
85
- var largeImages = allImages.filter(function () {
86
- return (jQuery(this).width() > 70) || (jQuery(this).height() > 70)
87
- })
88
- for (i = 0; i < largeImages.length; i++) {
89
- html += '<li><a target="_blank" id="mashnetPinterestPopup" href="https://pinterest.com/pin/create/button/?url=' + encodeURIComponent(window.location.href) + '%2F&media=' + largeImages[i].src + '&description=' + largeImages[i].alt + '"><img src="' + largeImages[i].src + '"></a></li>';
90
- }
91
- }
92
-
93
 
94
- // check the sharecount caching method
95
  mashsb_check_cache();
96
 
97
  // Fix for the inline post plugin which removes the zero share count
@@ -112,6 +75,58 @@ jQuery(document).ready(function ($) {
112
  }, 6000);
113
  }
114
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
  function mashsb_update_cache() {
116
  var mashsb_url = window.location.href;
117
  if (mashsb_url.indexOf("?") > -1) {
@@ -224,6 +239,284 @@ jQuery(document).ready(function ($) {
224
  return value.toFixed(0);
225
  }
226
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
227
 
228
 
229
  /* Count up script jquery-countTo
@@ -323,51 +616,223 @@ jQuery(document).ready(function ($) {
323
  }
324
  });
325
 
326
-
327
- /*!------------------------------------------------------
328
- * jQuery nearest v1.0.3
329
- * http://github.com/jjenzz/jQuery.nearest
330
- * ------------------------------------------------------
331
- * Copyright (c) 2012 J. Smith (@jjenzz)
332
- * Dual licensed under the MIT and GPL licenses:
333
- * http://www.opensource.org/licenses/mit-license.php
334
- * http://www.gnu.org/licenses/gpl.html
335
  */
336
- (function ($, d) {
337
- $.fn.nearest = function (selector) {
338
- var self, nearest, el, s, p,
339
- hasQsa = d.querySelectorAll;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
340
 
341
- function update(el) {
342
- nearest = nearest ? nearest.add(el) : $(el);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
343
  }
 
344
 
345
- this.each(function () {
346
- self = this;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
347
 
348
- $.each(selector.split(','), function () {
349
- s = $.trim(this);
 
 
 
 
 
350
 
351
- if (!s.indexOf('#')) {
352
- // selector starts with an ID
353
- update((hasQsa ? d.querySelectorAll(s) : $(s)));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
354
  } else {
355
- // is a class or tag selector
356
- // so need to traverse
357
- p = self.parentNode;
358
- while (p) {
359
- el = hasQsa ? p.querySelectorAll(s) : $(p).find(s);
360
- if (el.length) {
361
- update(el);
362
- break;
363
- }
364
- p = p.parentNode;
365
- }
366
  }
367
- });
 
 
 
 
368
 
 
 
369
  });
370
 
371
- return nearest || $();
 
 
372
  };
373
- }(jQuery, document));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  var strict;
2
 
3
+ /*!------------------------------------------------------
4
+ * jQuery nearest v1.0.3
5
+ * http://github.com/jjenzz/jQuery.nearest
6
+ * ------------------------------------------------------
7
+ * Copyright (c) 2012 J. Smith (@jjenzz)
8
+ * Dual licensed under the MIT and GPL licenses:
9
+ * http://www.opensource.org/licenses/mit-license.php
10
+ * http://www.gnu.org/licenses/gpl.html
11
+ */
12
+ (function ($, d) {
13
+ $.fn.nearest = function (selector) {
14
+ var self, nearest, el, s, p,
15
+ hasQsa = d.querySelectorAll;
 
 
 
 
 
 
 
16
 
17
+ function update(el) {
18
+ nearest = nearest ? nearest.add(el) : $(el);
19
+ }
 
 
 
 
 
20
 
21
+ this.each(function () {
22
+ self = this;
23
 
24
+ $.each(selector.split(','), function () {
25
+ s = $.trim(this);
26
 
27
+ if (!s.indexOf('#')) {
28
+ // selector starts with an ID
29
+ update((hasQsa ? d.querySelectorAll(s) : $(s)));
30
+ } else {
31
+ // is a class or tag selector
32
+ // so need to traverse
33
+ p = self.parentNode;
34
+ while (p) {
35
+ el = hasQsa ? p.querySelectorAll(s) : $(p).find(s);
36
+ if (el.length) {
37
+ update(el);
38
+ break;
39
+ }
40
+ p = p.parentNode;
41
+ }
42
+ }
43
  });
 
44
 
45
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
 
47
+ return nearest || $();
48
+ };
49
+ }(jQuery, document));
50
 
51
+ jQuery(document).ready(function ($) {
52
+
53
+ /* Show Whatsapp button on mobile devices iPhones and Android only */
54
+ if(navigator.userAgent.match(/(iPhone)/i) || navigator.userAgent.match(/(Android)/i)){
55
+ $('.mashicon-whatsapp').show();
56
+ }
 
 
57
 
 
58
  mashsb_check_cache();
59
 
60
  // Fix for the inline post plugin which removes the zero share count
75
  }, 6000);
76
  }
77
 
78
+ /**
79
+ *
80
+ * Deprecated
81
+ */
82
+ /*if (typeof('mashsb') && mashsb.restapi == "1"){
83
+ mashsb_restapi_check_cache();
84
+ }
85
+ else if (typeof('mashsb') && mashsb.restapi == "0"){
86
+ mashsb_check_cache_ajax();
87
+ }*/
88
+ /**
89
+ * Check Cache via ajax endpoint
90
+ *
91
+ */
92
+ function mashsb_check_cache_ajax() {
93
+
94
+ setTimeout(function () {
95
+
96
+ var data = {
97
+ action: 'mashsb_refresh_cache',
98
+ };
99
+ $.post(ajaxurl, data, function (resp, status, xhr) {
100
+ if (resp == "1") {
101
+ mashsb_update_cache();
102
+ //console.log('cache must be updated ' + + xhr.status + ' ' + xhr.statusText + xhr.statusText);
103
+ }
104
+ }).fail(function (xhr) {
105
+ console.log('Fatal Error:' + xhr.status + ' ' + xhr.statusText + xhr.statusText);
106
+ });
107
+ }, 4000);
108
+ }
109
+ /**
110
+ * Check Cache via rest api
111
+ *
112
+ */
113
+ function mashsb_restapi_check_cache() {
114
+
115
+ setTimeout(function () {
116
+
117
+ var data = {};
118
+ var mash_rest_url = 'http://src.wordpress-develop.dev/wp-json/mashshare/v1/verifycache/';
119
+ $.get(mash_rest_url, data, function (resp, status, xhr) {
120
+ if (resp == "1") {
121
+ mashsb_update_cache();
122
+ //console.log('cache must be updated ');
123
+ }
124
+ }).fail(function (xhr) {
125
+ console.log('Fatal Error:' + xhr.status + ' ' + xhr.statusText + xhr.statusText);
126
+ });
127
+ }, 4000);
128
+ }
129
+
130
  function mashsb_update_cache() {
131
  var mashsb_url = window.location.href;
132
  if (mashsb_url.indexOf("?") > -1) {
239
  return value.toFixed(0);
240
  }
241
 
242
+ /**
243
+ * Responsive Buttons
244
+ */
245
+ function responsiveButtons()
246
+ {
247
+ // Responsive buttons are not in use
248
+ if (mashsb.dynamic_buttons != 1) return;
249
+
250
+ // Start our Listener
251
+ var listenerContainer = $(".mashsb-container.mashsb-main .mashsb-count");
252
+ if (listenerContainer.length){
253
+ new ResizeSensor(listenerContainer, function () {
254
+ calculate();
255
+ });
256
+ }
257
+ var listenerViews = $(".mashsb-container.mashsb-main .mashpv .count");
258
+ if (listenerViews.length){
259
+ new ResizeSensor(listenerViews, function () {
260
+ calculate();
261
+ });
262
+ }
263
+
264
+ // Ajax Listener
265
+ var ajaxListener = {},
266
+ interval = {};
267
+ //$primaryButtons = $("aside.mashsb-container.mashsb-main > .mashsb-box > .mashsb-buttons > a[class^='mashicon-']:visible:not(.secondary-shares a)"),
268
+ //$secondaryShareButtonsContainer = $("aside.mashsb-container .secondary-shares");
269
+
270
+ // Added listener so in case if somehow the ajax request is being made, the buttons will resize again.
271
+ // This is useful for good reasons for example;
272
+ // 1. No need to include responsiveButtons() in case if anything changes or ajax request needs to be added
273
+ // or modified.
274
+ // 2. If the ajax request is done outside of MashShare work such as theme customisations
275
+ ajaxListener.open = XMLHttpRequest.prototype.open;
276
+ ajaxListener.send = XMLHttpRequest.prototype.send;
277
+ ajaxListener.callback = function (pointer) {
278
+ // Request is not completed yet
279
+ if (pointer.readyState != 4 || pointer.status != 200) {
280
+ return;
281
+ }
282
+
283
+ var action = getAction(pointer.responseURL);
284
+
285
+ // Re-calculate the width of the buttons on Get View ajax call
286
+ if (action === "mashpv_get_views") {
287
+ // Adjust for animation
288
+ setTimeout(function() {
289
+ //calculate();
290
+ }, 1100);
291
+ }
292
+
293
+ //console.log(interval);
294
+ // Clear the interval for it
295
+ clearInterval(interval[action]);
296
+ };
297
+
298
+ // Executes 5 min later to clear IF any interval that's left
299
+ setTimeout(function() {
300
+ var key;
301
+ for (key in interval) {
302
+ if (interval.hasOwnProperty(key)) {
303
+ clearInterval(interval[key]);
304
+ }
305
+ }
306
+
307
+ }, 5 * (60 * 1000));
308
+
309
+ // When an ajax requests is opened
310
+ XMLHttpRequest.prototype.open = function(method, url) {
311
+ // In case if they are not defined
312
+ if (!method) method = '';
313
+ if (!url) url = '';
314
+
315
+ // Attach values
316
+ ajaxListener.open.apply(this, arguments);
317
+ ajaxListener.method = method;
318
+ ajaxListener.url = url;
319
+
320
+ // If that's the get method, attach data to our listener
321
+ if (method.toLowerCase() === "get") {
322
+ ajaxListener.data = url.split('?');
323
+ ajaxListener.data = ajaxListener.data[1];
324
+ ajaxListener.action = getAction(ajaxListener.data);
325
+ }
326
+ };
327
+
328
+ // When an ajax request is sent
329
+ XMLHttpRequest.prototype.send = function(data, params) {
330
+ ajaxListener.send.apply(this, arguments);
331
+
332
+ // If that's the post method, attach data to our listener
333
+ if (ajaxListener.method.toLowerCase() === "post") {
334
+ ajaxListener.data = data;
335
+ ajaxListener.action = getAction(ajaxListener.data);
336
+ }
337
+
338
+ // $ overwrites onstatechange (darn you jQuery!),
339
+ // we need to monitor readyState and the status
340
+ var pointer = this;
341
+ interval[ajaxListener.action] = window.setInterval(ajaxListener.callback, 100, pointer);
342
+ };
343
+
344
+ // Recalculate width of the buttons when plus / minus button is clicked
345
+ $("body")
346
+ .on("click", ".onoffswitch", function() {
347
+ //$secondaryShareButtonsContainer.css("display","block");
348
+ setTimeout(function() {calculate();}, 200);
349
+ })
350
+ .on("click", ".onoffswitch2", function() {
351
+ calculate();
352
+ });
353
+
354
+ // Window resize
355
+ $(window).resize(function() {
356
+ calculate();
357
+ });
358
+
359
+ // When there is no ajax call, this one is required to be here!
360
+ // No worries though, once ajax call is done, it will adjust
361
+ // Adjustment for animation
362
+ if (mashsb.animate_shares == 1) {
363
+ setTimeout(function() {
364
+ calculate();
365
+ }, 500);
366
+ }
367
+ // No need animation adjusting
368
+ else calculate();
369
+
370
+ /**
371
+ * Calculation for buttons
372
+ */
373
+ function calculate()
374
+ {
375
+ var $container = $("aside.mashsb-container.mashsb-main");
376
+
377
+ if ($container.length > 0) {
378
+ $container.each(function() {
379
+ var $this = $(this),
380
+ $primaryButtons = $this.find(".mashsb-box > .mashsb-buttons > .mashsb-primary-shares > a[class^='mashicon-']:visible");
381
+
382
+ //$this.find(".mashsb-box > .mashsb-buttons > .secondary-shares").css("clear", "both");
383
+
384
+ // Variables
385
+ var averageWidth = getAverageWidth($primaryButtons);
386
+
387
+ // Do the styling...
388
+ $primaryButtons.css({
389
+ //"width" : averageWidth + "px", // Need to de-activate this for long labels
390
+ "min-width" : averageWidth + "px",
391
+ // Below this part is just to ensure the stability...
392
+ // Not all themes are apparently adding these rules
393
+ // thus messing up the whole width of the elements
394
+ "box-sizing" : "border-box",
395
+ "-moz-box-sizing" : "border-box",
396
+ "-webkit-box-sizing": "border-box"
397
+ });
398
+ });
399
+ }
400
+ }
401
+
402
+ /**
403
+ * Get action from URL string
404
+ * @param data
405
+ * @returns {*}
406
+ */
407
+ function getAction(data)
408
+ {
409
+ // Split data
410
+ data = data.split('&');
411
+
412
+ // Let's work our magic here
413
+ // Split data
414
+ var dataLength = data.length,
415
+ i;
416
+
417
+ if (dataLength == 1) return data[0];
418
+
419
+ // Get the action
420
+ for (i = 0; i < dataLength; i++) {
421
+ if (data[i].startsWith("action=")) {
422
+ return data[i].replace("action=", '');
423
+ }
424
+ }
425
+
426
+ return '';
427
+ }
428
+
429
+ /**
430
+ * Floors / rounds down given number to its closest with allowed decimal points
431
+ * @param number
432
+ * @param decimals
433
+ * @returns {number}
434
+ */
435
+ function floorDown(number, decimals)
436
+ {
437
+ decimals = decimals || 0;
438
+ return ( Math.floor( number * Math.pow(10, decimals) ) / Math.pow(10, decimals) );
439
+ }
440
+
441
+ /**
442
+ * Rounds up given number to is closest with allowed decimal points
443
+ * @param number
444
+ * @param decimals
445
+ * @returns {number}
446
+ */
447
+ function round(number, decimals)
448
+ {
449
+ return Math.round(number * Math.pow(10, decimals)) / Math.pow(10, decimals);
450
+ }
451
+
452
+ /**
453
+ * Gets average widht of each primary button
454
+ * @returns {number|*}
455
+ */
456
+ function getAverageWidth(primaryButtons)
457
+ {
458
+ // Variables
459
+ var $mashShareContainer = primaryButtons.parents("aside.mashsb-container.mashsb-main"),
460
+ $container = $mashShareContainer.find(".mashsb-buttons > .mashsb-primary-shares"),
461
+ $shareCountContainer = $mashShareContainer.find(".mashsb-box > .mashsb-count:not(.mashpv)"),
462
+ isShareCountContainerVisible = ($shareCountContainer.length > 0 && $shareCountContainer.is(":visible")),
463
+ $viewCounterContainer = $mashShareContainer.find(".mashsb-box > .mashpv.mashsb-count"),
464
+ isViewCounterContainerVisible = $viewCounterContainer.is(":visible"),
465
+ $plusButton = $container.find(".onoffswitch"),
466
+ isPlusButtonVisible = $plusButton.is(":visible"),
467
+ totalUsedWidth = 0,
468
+ averageWidth;
469
+
470
+ $plusButton.css("margin-right", 0);
471
+
472
+ // Share counter is visible
473
+ if (isShareCountContainerVisible === true) {
474
+ var shareCountContainerWidth = parseFloat($shareCountContainer.css("margin-right"));
475
+ if (isNaN(shareCountContainerWidth)) shareCountContainerWidth = 0;
476
+ shareCountContainerWidth = shareCountContainerWidth + $shareCountContainer[0].getBoundingClientRect().width;
477
+ shareCountContainerWidth = round(shareCountContainerWidth, 2);
478
+
479
+ totalUsedWidth += shareCountContainerWidth;
480
+ }
481
+
482
+ // View counter is visible
483
+ if (isViewCounterContainerVisible === true) {
484
+ var viewCountContainerWidth = parseFloat($viewCounterContainer.css("margin-right"));
485
+ if (isNaN(viewCountContainerWidth)) viewCountContainerWidth = 0;
486
+ viewCountContainerWidth = viewCountContainerWidth + $viewCounterContainer[0].getBoundingClientRect().width;
487
+ viewCountContainerWidth = round(viewCountContainerWidth, 2);
488
+
489
+ totalUsedWidth += viewCountContainerWidth;
490
+ }
491
+
492
+ // Plus button is visible
493
+ if (isPlusButtonVisible === true) {
494
+ var extraWidth = 5; // we use this to have some extra power in case weird layout is used
495
+ totalUsedWidth += $plusButton[0].getBoundingClientRect().width + extraWidth;
496
+ }
497
+
498
+ //var tempWidth = $container[0].getBoundingClientRect().width;
499
+
500
+ // Calculate average width of each button (including their margins)
501
+ // We need to get precise width of the container, jQuery's width() is rounding up the numbers
502
+ averageWidth = ($container[0].getBoundingClientRect().width - totalUsedWidth) / primaryButtons.length;
503
+ if (isNaN(averageWidth)) {
504
+ return;
505
+ }
506
+
507
+ // We're only interested in positive numbers
508
+ if (averageWidth < 0) averageWidth = Math.abs(averageWidth);
509
+
510
+ // Now get the right width without the margin
511
+ averageWidth = averageWidth - (primaryButtons.first().outerWidth(true) - primaryButtons.first().outerWidth());
512
+ // Floor it down
513
+ averageWidth = floorDown(averageWidth, 2);
514
+
515
+ return averageWidth;
516
+ }
517
+ }
518
+ // Deactivate it for now and check if we can reach the same but better with CSS Flex boxes
519
+ //responsiveButtons();
520
 
521
 
522
  /* Count up script jquery-countTo
616
  }
617
  });
618
 
619
+ /**
620
+ * Copyright Marc J. Schmidt. See the LICENSE file at the top-level
621
+ * directory of this distribution and at
622
+ * https://github.com/marcj/css-element-queries/blob/master/LICENSE.
 
 
 
 
 
623
  */
624
+ ;
625
+ (function (root, factory) {
626
+ if (typeof define === "function" && define.amd) {
627
+ define(factory);
628
+ } else if (typeof exports === "object") {
629
+ module.exports = factory();
630
+ } else {
631
+ root.ResizeSensor = factory();
632
+ }
633
+ }(this, function () {
634
+
635
+ // Only used for the dirty checking, so the event callback count is limted to max 1 call per fps per sensor.
636
+ // In combination with the event based resize sensor this saves cpu time, because the sensor is too fast and
637
+ // would generate too many unnecessary events.
638
+ var requestAnimationFrame = window.requestAnimationFrame ||
639
+ window.mozRequestAnimationFrame ||
640
+ window.webkitRequestAnimationFrame ||
641
+ function (fn) {
642
+ return window.setTimeout(fn, 20);
643
+ };
644
 
645
+ /**
646
+ * Iterate over each of the provided element(s).
647
+ *
648
+ * @param {HTMLElement|HTMLElement[]} elements
649
+ * @param {Function} callback
650
+ */
651
+ function forEachElement(elements, callback){
652
+ var elementsType = Object.prototype.toString.call(elements);
653
+ var isCollectionTyped = ('[object Array]' === elementsType
654
+ || ('[object NodeList]' === elementsType)
655
+ || ('[object HTMLCollection]' === elementsType)
656
+ || ('undefined' !== typeof jQuery && elements instanceof jQuery) //jquery
657
+ || ('undefined' !== typeof Elements && elements instanceof Elements) //mootools
658
+ );
659
+ var i = 0, j = elements.length;
660
+ if (isCollectionTyped) {
661
+ for (; i < j; i++) {
662
+ callback(elements[i]);
663
+ }
664
+ } else {
665
+ callback(elements);
666
  }
667
+ }
668
 
669
+ /**
670
+ * Class for dimension change detection.
671
+ *
672
+ * @param {Element|Element[]|Elements|jQuery} element
673
+ * @param {Function} callback
674
+ *
675
+ * @constructor
676
+ */
677
+ var ResizeSensor = function(element, callback) {
678
+ /**
679
+ *
680
+ * @constructor
681
+ */
682
+ function EventQueue() {
683
+ var q = [];
684
+ this.add = function(ev) {
685
+ q.push(ev);
686
+ };
687
+
688
+ var i, j;
689
+ this.call = function() {
690
+ for (i = 0, j = q.length; i < j; i++) {
691
+ q[i].call();
692
+ }
693
+ };
694
 
695
+ this.remove = function(ev) {
696
+ var newQueue = [];
697
+ for(i = 0, j = q.length; i < j; i++) {
698
+ if(q[i] !== ev) newQueue.push(q[i]);
699
+ }
700
+ q = newQueue;
701
+ }
702
 
703
+ this.length = function() {
704
+ return q.length;
705
+ }
706
+ }
707
+
708
+ /**
709
+ * @param {HTMLElement} element
710
+ * @param {String} prop
711
+ * @returns {String|Number}
712
+ */
713
+ function getComputedStyle(element, prop) {
714
+ if (element.currentStyle) {
715
+ return element.currentStyle[prop];
716
+ } else if (window.getComputedStyle) {
717
+ return window.getComputedStyle(element, null).getPropertyValue(prop);
718
+ } else {
719
+ return element.style[prop];
720
+ }
721
+ }
722
+
723
+ /**
724
+ *
725
+ * @param {HTMLElement} element
726
+ * @param {Function} resized
727
+ */
728
+ function attachResizeEvent(element, resized) {
729
+ if (!element.resizedAttached) {
730
+ element.resizedAttached = new EventQueue();
731
+ element.resizedAttached.add(resized);
732
+ } else if (element.resizedAttached) {
733
+ element.resizedAttached.add(resized);
734
+ return;
735
+ }
736
+
737
+ element.resizeSensor = document.createElement('div');
738
+ element.resizeSensor.className = 'resize-sensor';
739
+ var style = 'position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;';
740
+ var styleChild = 'position: absolute; left: 0; top: 0; transition: 0s;';
741
+
742
+ element.resizeSensor.style.cssText = style;
743
+ element.resizeSensor.innerHTML =
744
+ '<div class="resize-sensor-expand" style="' + style + '">' +
745
+ '<div style="' + styleChild + '"></div>' +
746
+ '</div>' +
747
+ '<div class="resize-sensor-shrink" style="' + style + '">' +
748
+ '<div style="' + styleChild + ' width: 200%; height: 200%"></div>' +
749
+ '</div>';
750
+ element.appendChild(element.resizeSensor);
751
+
752
+ if (getComputedStyle(element, 'position') == 'static') {
753
+ element.style.position = 'relative';
754
+ }
755
+
756
+ var expand = element.resizeSensor.childNodes[0];
757
+ var expandChild = expand.childNodes[0];
758
+ var shrink = element.resizeSensor.childNodes[1];
759
+
760
+ var reset = function() {
761
+ expandChild.style.width = 100000 + 'px';
762
+ expandChild.style.height = 100000 + 'px';
763
+
764
+ expand.scrollLeft = 100000;
765
+ expand.scrollTop = 100000;
766
+
767
+ shrink.scrollLeft = 100000;
768
+ shrink.scrollTop = 100000;
769
+ };
770
+
771
+ reset();
772
+ var dirty = false;
773
+
774
+ var dirtyChecking = function() {
775
+ if (!element.resizedAttached) return;
776
+
777
+ if (dirty) {
778
+ element.resizedAttached.call();
779
+ dirty = false;
780
+ }
781
+
782
+ requestAnimationFrame(dirtyChecking);
783
+ };
784
+
785
+ requestAnimationFrame(dirtyChecking);
786
+ var lastWidth, lastHeight;
787
+ var cachedWidth, cachedHeight; //useful to not query offsetWidth twice
788
+
789
+ var onScroll = function() {
790
+ if ((cachedWidth = element.offsetWidth) != lastWidth || (cachedHeight = element.offsetHeight) != lastHeight) {
791
+ dirty = true;
792
+
793
+ lastWidth = cachedWidth;
794
+ lastHeight = cachedHeight;
795
+ }
796
+ reset();
797
+ };
798
+
799
+ var addEvent = function(el, name, cb) {
800
+ if (el.attachEvent) {
801
+ el.attachEvent('on' + name, cb);
802
  } else {
803
+ el.addEventListener(name, cb);
 
 
 
 
 
 
 
 
 
 
804
  }
805
+ };
806
+
807
+ addEvent(expand, 'scroll', onScroll);
808
+ addEvent(shrink, 'scroll', onScroll);
809
+ }
810
 
811
+ forEachElement(element, function(elem){
812
+ attachResizeEvent(elem, callback);
813
  });
814
 
815
+ this.detach = function(ev) {
816
+ ResizeSensor.detach(element, ev);
817
+ };
818
  };
819
+
820
+ ResizeSensor.detach = function(element, ev) {
821
+ forEachElement(element, function(elem){
822
+ if(elem.resizedAttached && typeof ev == "function"){
823
+ elem.resizedAttached.remove(ev);
824
+ if(elem.resizedAttached.length()) return;
825
+ }
826
+ if (elem.resizeSensor) {
827
+ if (elem.contains(elem.resizeSensor)) {
828
+ elem.removeChild(elem.resizeSensor);
829
+ }
830
+ delete elem.resizeSensor;
831
+ delete elem.resizedAttached;
832
+ }
833
+ });
834
+ };
835
+
836
+ return ResizeSensor;
837
+
838
+ }));
assets/js/mashsb.min.js CHANGED
@@ -1 +1 @@
1
- var strict;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)}(navigator.userAgent.match(/(iPhone)/i)||navigator.userAgent.match(/(Android)/i))&&a(".mashicon-whatsapp").show(),a("body").off("click",".mashicon-pinterest").on("click",".mashicon-pinterest",function(b){b.preventDefault(),console.log("preventDefault:"+b),winWidth=520,winHeight=350;var c=screen.height/2-winHeight/2,d=screen.width/2-winWidth/2,e=a(this).attr("data-mashsb-url");window.open(e,"sharer","top="+c+",left="+d+",toolbar=0,status=0,width="+winWidth+",height="+winHeight+",resizable=yes")}),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){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);
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)}(navigator.userAgent.match(/(iPhone)/i)||navigator.userAgent.match(/(Android)/i))&&a(".mashicon-whatsapp").show(),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/settings/metabox-settings.php CHANGED
@@ -146,25 +146,13 @@ function mashsb_meta_boxes( $meta_boxes ) {
146
  'both' => __('Above & Below Content','mashsb'),
147
  )
148
  ),
149
- // Setup the og:type
150
- array(
151
- 'name' => '<span class="mashicon mashicon-share"> </span> ' . __( 'Open Graph Type', 'mashsb' ),
152
- 'desc' => __( 'This is used by the open graph meta tag og:type. Leave this blank to use the default value "article". ', 'mashsb' ),
153
- 'id' => $prefix . 'og_type',
154
- 'type' => 'text',
155
- 'clone' => false,
156
- 'class' => 'mashsb-og-type',
157
- 'before' => '<div style="max-width:250px;float:left;">',
158
- 'after' => '</div>',
159
- ),
160
  array(
161
  'helper'=> '<a class="mashsb-helper" href="#" style="margin-left:-4px;"></a><div class="mashsb-message" style="display: none;">'.__('Validate open graph meta tags on your site. Incorrect data can result in wrong share description, title or images and should be fixed! In the facebook debugger click the link "Fetch new scrape information" to purge the facebook cache.','mashsb').'</div>',
162
  'id' => $prefix . 'validate_og',
163
- 'before' => '<div style="max-width:250px;margin-top:45px;">',
164
  'after' => '</div>',
165
  'type' => 'validate_og'
166
  ),
167
-
168
  array(
169
  'name' => 'divider',
170
  'id' => 'divider',
146
  'both' => __('Above & Below Content','mashsb'),
147
  )
148
  ),
 
 
 
 
 
 
 
 
 
 
 
149
  array(
150
  'helper'=> '<a class="mashsb-helper" href="#" style="margin-left:-4px;"></a><div class="mashsb-message" style="display: none;">'.__('Validate open graph meta tags on your site. Incorrect data can result in wrong share description, title or images and should be fixed! In the facebook debugger click the link "Fetch new scrape information" to purge the facebook cache.','mashsb').'</div>',
151
  'id' => $prefix . 'validate_og',
152
+ 'before' => '<div style="max-width:250px;float:left;margin-top:45px;">',
153
  'after' => '</div>',
154
  'type' => 'validate_og'
155
  ),
 
156
  array(
157
  'name' => 'divider',
158
  'id' => 'divider',
includes/admin/settings/register-settings.php CHANGED
@@ -264,7 +264,7 @@ function mashsb_get_registered_settings() {
264
  array(
265
  'id' => 'fb_access_token_new',
266
  'name' => __( 'Facebook User Access Token', 'mashsb' ),
267
- 'desc' => sprintf( __( 'Try this to be able to make up to 200 calls per hour to facebook api. <a href="%s" target="_blank">Read here</a> how to get the access token. If your access token is not working just leave this field empty. Shares are counted, though.', 'mashsb' ), 'http://docs.mashshare.net/article/132-how-to-create-a-facebook-access-token' ),
268
  'type' => 'fboauth',
269
  'size' => 'large'
270
  ),
264
  array(
265
  'id' => 'fb_access_token_new',
266
  'name' => __( 'Facebook User Access Token', 'mashsb' ),
267
+ 'desc' => sprintf( __( 'Required if your website hits the facebook rate limit of 200 calls per hour. <a href="%s" target="_blank">Read here</a> how to get the access token.', 'mashsb' ), 'http://docs.mashshare.net/article/132-how-to-create-a-facebook-access-token' ),
268
  'type' => 'fboauth',
269
  'size' => 'large'
270
  ),
includes/header-meta-tags.php CHANGED
@@ -18,7 +18,6 @@ class MASHSB_HEADER_META_TAGS {
18
  protected $og_title = '';
19
  protected $og_description;
20
  protected $og_image;
21
- protected $og_type;
22
  protected $fb_author_url;
23
  protected $fb_app_id;
24
  protected $twitter_title;
@@ -83,7 +82,6 @@ class MASHSB_HEADER_META_TAGS {
83
  $this->og_title = $this->sanitize_data( get_post_meta( $this->postID, 'mashsb_og_title', true ) );
84
  $this->og_description = $this->sanitize_data( get_post_meta( $this->postID, 'mashsb_og_description', true ) );
85
  $this->og_image = $this->get_image_url();
86
- $this->og_type = $this->sanitize_data( get_post_meta( $this->postID, 'mashsb_og_type', true ) );
87
  $this->twitter_title = $this->sanitize_data( get_post_meta( $this->postID, 'mashsb_custom_tweet', true ) );
88
  $this->twitter_creator = $this->get_twitter_creator();
89
  $this->twitter_site = mashsb_get_twitter_username();
@@ -189,20 +187,6 @@ class MASHSB_HEADER_META_TAGS {
189
  // Default return value
190
  return $this->post_title;
191
  }
192
- /**
193
- * Get the og type
194
- *
195
- * @return string
196
- */
197
- public function get_og_type() {
198
-
199
- if( !empty( $this->og_type ) ) {
200
- return $this->og_type;
201
- }
202
-
203
- // Default return value
204
- return 'article';
205
- }
206
 
207
  /**
208
  * Get the og description
@@ -560,7 +544,7 @@ class MASHSB_HEADER_META_TAGS {
560
  }
561
 
562
  $opengraph = PHP_EOL . '<!-- Open Graph Meta Tags generated by MashShare ' . MASHSB_VERSION . ' - https://mashshare.net -->';
563
- $opengraph .= PHP_EOL . '<meta property="og:type" content="'.$this->get_og_type().'" /> ';
564
  if( $this->get_og_title() ) {
565
  $opengraph .= PHP_EOL . '<meta property="og:title" content="' . $this->get_og_title() . '" />';
566
  }
18
  protected $og_title = '';
19
  protected $og_description;
20
  protected $og_image;
 
21
  protected $fb_author_url;
22
  protected $fb_app_id;
23
  protected $twitter_title;
82
  $this->og_title = $this->sanitize_data( get_post_meta( $this->postID, 'mashsb_og_title', true ) );
83
  $this->og_description = $this->sanitize_data( get_post_meta( $this->postID, 'mashsb_og_description', true ) );
84
  $this->og_image = $this->get_image_url();
 
85
  $this->twitter_title = $this->sanitize_data( get_post_meta( $this->postID, 'mashsb_custom_tweet', true ) );
86
  $this->twitter_creator = $this->get_twitter_creator();
87
  $this->twitter_site = mashsb_get_twitter_username();
187
  // Default return value
188
  return $this->post_title;
189
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
190
 
191
  /**
192
  * Get the og description
544
  }
545
 
546
  $opengraph = PHP_EOL . '<!-- Open Graph Meta Tags generated by MashShare ' . MASHSB_VERSION . ' - https://mashshare.net -->';
547
+ $opengraph .= PHP_EOL . '<meta property="og:type" content="article" /> ';
548
  if( $this->get_og_title() ) {
549
  $opengraph .= PHP_EOL . '<meta property="og:title" content="' . $this->get_og_title() . '" />';
550
  }
includes/scripts.php CHANGED
@@ -63,6 +63,7 @@ function mashsb_load_scripts( $hook ) {
63
 
64
  wp_enqueue_script( 'mashsb', $js_dir . 'mashsb' . $suffix . '.js', array('jquery'), MASHSB_VERSION, $in_footer );
65
  //wp_enqueue_script( 'element-queries', $js_dir . 'ElementQueries' . '.js', array('jquery'), MASHSB_VERSION, $in_footer );
 
66
 
67
  !isset( $mashsb_options['disable_sharecount'] ) ? $shareresult = getSharedcount( $url ) : $shareresult = 0;
68
  wp_localize_script( 'mashsb', 'mashsb', array(
63
 
64
  wp_enqueue_script( 'mashsb', $js_dir . 'mashsb' . $suffix . '.js', array('jquery'), MASHSB_VERSION, $in_footer );
65
  //wp_enqueue_script( 'element-queries', $js_dir . 'ElementQueries' . '.js', array('jquery'), MASHSB_VERSION, $in_footer );
66
+ //wp_enqueue_script( 'resize-sensor', $js_dir . 'ResizeSensor' . '.js', array('jquery'), MASHSB_VERSION, $in_footer );
67
 
68
  !isset( $mashsb_options['disable_sharecount'] ) ? $shareresult = getSharedcount( $url ) : $shareresult = 0;
69
  wp_localize_script( 'mashsb', 'mashsb', array(
includes/template-functions.php CHANGED
@@ -1154,8 +1154,6 @@ function mashsb_get_document_title() {
1154
  *
1155
  * @param string $title The document title. Default empty string.
1156
  */
1157
-
1158
- $title = '';
1159
 
1160
  // If it's a 404 page, use a "Page not found" title.
1161
  if( is_404() ) {
1154
  *
1155
  * @param string $title The document title. Default empty string.
1156
  */
 
 
1157
 
1158
  // If it's a 404 page, use a "Page not found" title.
1159
  if( is_404() ) {
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.4.5
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.4.5' );
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.4
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.4' );
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.8
12
- Stable tag: 3.4.5
13
 
14
  Social Media Share Buttons for Twitter, Facebook and other social networks. Highly customizable Social Media ecosystem
15
 
@@ -246,13 +246,6 @@ Read here more about this: http://docs.mashshare.net/article/10-facebook-is-show
246
 
247
  == Changelog ==
248
 
249
- = 3.4.5 =
250
- * New: Create custom values for open graph meta tag og:type, e.g video, product
251
- * Fix: undefined var title
252
- * Fix: Pinterest popup not opening when network add-on is not installed
253
- * Fix: Remove deprecated code and make mashsb.js smaller
254
- * Fix: Facebook access token validation function not working
255
-
256
  = 3.4.4 =
257
  * Fix: Check fb access token not working properly
258
 
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.8
12
+ Stable tag: 3.4.4
13
 
14
  Social Media Share Buttons for Twitter, Facebook and other social networks. Highly customizable Social Media ecosystem
15
 
246
 
247
  == Changelog ==
248
 
 
 
 
 
 
 
 
249
  = 3.4.4 =
250
  * Fix: Check fb access token not working properly
251