jQuery Pin It Button for Images - Version 2.2.10

Version Description

  • Released 2017-04-21
  • Minor JavaScript improvements
Download this release

Release Info

Developer mrsztuczkens
Plugin Icon wp plugin jQuery Pin It Button for Images
Version 2.2.10
Comparing to
See all releases

Code changes from version 2.2.9 to 2.2.10

includes/admin/settings/jpibfi-advanced-settings.php CHANGED
@@ -9,12 +9,12 @@ class JPIBFI_Advanced_Settings extends JPIBFI_Settings_Base {
9
  function get_settings_i18n() {
10
  $parent = parent::get_settings_i18n();
11
  $i18n = array();
12
- $i18n['title'] = __('Advanced settings', 'jquery-pin-it-button-for-images');
13
  $i18n['filters_label'] = __( 'Filters', 'jquery-pin-it-button-for-images' );
14
  $i18n['filters_description'] =
15
  sprintf(
16
  __( 'You can enabled or disable if the plugin should use a certain filter and change the priority setting. Read more about filters <a href="%s" target="_blank">here</a>. By default all 3 filters are active with the priority of 10.', 'jquery-pin-it-button-for-images' ),
17
- 'https://codex.wordpress.org/Plugin_API'
18
  );
19
  $i18n['filter_template'] = __( '%name% <label>with priority of</label> %priority%', 'jquery-pin-it-button-for-images' );
20
 
@@ -34,9 +34,9 @@ class JPIBFI_Advanced_Settings extends JPIBFI_Settings_Base {
34
  $res = array();
35
 
36
  $res['filter_the_content_on'] = array(
37
- 'key' => 'filter_the_content_on',
38
  'text' => 'the_content',
39
- 'type' => 'boolean'
40
  );
41
 
42
  $res['filter_the_content_priority'] = array(
@@ -46,9 +46,9 @@ class JPIBFI_Advanced_Settings extends JPIBFI_Settings_Base {
46
  );
47
 
48
  $res['filter_the_excerpt_on'] = array(
49
- 'key' => 'filter_the_excerpt_on',
50
  'text' => 'the_excerpt',
51
- 'type' => 'boolean'
52
  );
53
 
54
  $res['filter_the_excerpt_priority'] = array(
@@ -58,9 +58,9 @@ class JPIBFI_Advanced_Settings extends JPIBFI_Settings_Base {
58
  );
59
 
60
  $res['filter_post_thumbnail_html_on'] = array(
61
- 'key' => 'filter_post_thumbnail_html_on',
62
  'text' => 'post_thumbnail_html',
63
- 'type' => 'boolean'
64
  );
65
 
66
  $res['filter_post_thumbnail_html_priority'] = array(
@@ -69,6 +69,13 @@ class JPIBFI_Advanced_Settings extends JPIBFI_Settings_Base {
69
  'error_label' => __( 'post_thumbnail_html priority', 'jquery-pin-it-button-for-images' )
70
  );
71
 
 
 
 
 
 
 
 
72
  foreach ( $res as $key => $setting ) {
73
  $res[ $key ]['value'] = $option_value[ $key ];
74
  }
9
  function get_settings_i18n() {
10
  $parent = parent::get_settings_i18n();
11
  $i18n = array();
12
+ $i18n['title'] = __( 'Advanced settings', 'jquery-pin-it-button-for-images' );
13
  $i18n['filters_label'] = __( 'Filters', 'jquery-pin-it-button-for-images' );
14
  $i18n['filters_description'] =
15
  sprintf(
16
  __( 'You can enabled or disable if the plugin should use a certain filter and change the priority setting. Read more about filters <a href="%s" target="_blank">here</a>. By default all 3 filters are active with the priority of 10.', 'jquery-pin-it-button-for-images' ),
17
+ 'https://codex.wordpress.org/Plugin_API'
18
  );
19
  $i18n['filter_template'] = __( '%name% <label>with priority of</label> %priority%', 'jquery-pin-it-button-for-images' );
20
 
34
  $res = array();
35
 
36
  $res['filter_the_content_on'] = array(
37
+ 'key' => 'filter_the_content_on',
38
  'text' => 'the_content',
39
+ 'type' => 'boolean'
40
  );
41
 
42
  $res['filter_the_content_priority'] = array(
46
  );
47
 
48
  $res['filter_the_excerpt_on'] = array(
49
+ 'key' => 'filter_the_excerpt_on',
50
  'text' => 'the_excerpt',
51
+ 'type' => 'boolean'
52
  );
53
 
54
  $res['filter_the_excerpt_priority'] = array(
58
  );
59
 
60
  $res['filter_post_thumbnail_html_on'] = array(
61
+ 'key' => 'filter_post_thumbnail_html_on',
62
  'text' => 'post_thumbnail_html',
63
+ 'type' => 'boolean'
64
  );
65
 
66
  $res['filter_post_thumbnail_html_priority'] = array(
69
  'error_label' => __( 'post_thumbnail_html priority', 'jquery-pin-it-button-for-images' )
70
  );
71
 
72
+ $res['scroll_selector'] = array(
73
+ 'key' => 'scroll_selector',
74
+ 'type' => 'string',
75
+ 'label' => __( 'Scroll selector', 'jquery-pin-it-button-for-images' ),
76
+ 'desc' => __( 'Additional scroll selector for "Always" and "Always on touch devices" Show Button settings.', 'jquery-pin-it-button-for-images' )
77
+ );
78
+
79
  foreach ( $res as $key => $setting ) {
80
  $res[ $key ]['value'] = $option_value[ $key ];
81
  }
includes/includes/jpibfi-edd-sl-plugin-updater.php CHANGED
@@ -7,7 +7,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
7
  * Allows plugins to use their own update API.
8
  *
9
  * @author Easy Digital Downloads
10
- * @version 1.6.8
11
  */
12
  class JPIBFI_EDD_SL_Plugin_Updater {
13
 
@@ -39,8 +39,8 @@ class JPIBFI_EDD_SL_Plugin_Updater {
39
  $this->slug = basename( $_plugin_file, '.php' );
40
  $this->version = $_api_data['version'];
41
  $this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false;
42
-
43
- $this->cache_key = md5( serialize( $this->slug . $this->api_data['license'] ) );
44
 
45
  $edd_plugin_data[ $this->slug ] = $this->api_data;
46
 
@@ -98,7 +98,7 @@ class JPIBFI_EDD_SL_Plugin_Updater {
98
  $version_info = $this->get_cached_version_info();
99
 
100
  if ( false === $version_info ) {
101
- $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => ! empty( $this->api_data['beta'] ) ) );
102
 
103
  $this->set_version_info_cache( $version_info );
104
 
@@ -156,7 +156,7 @@ class JPIBFI_EDD_SL_Plugin_Updater {
156
  $version_info = $this->get_cached_version_info();
157
 
158
  if ( false === $version_info ) {
159
- $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => ! empty( $this->api_data['beta'] ) ) );
160
 
161
  $this->set_version_info_cache( $version_info );
162
  }
@@ -255,13 +255,13 @@ class JPIBFI_EDD_SL_Plugin_Updater {
255
  )
256
  );
257
 
258
- $cache_key = 'edd_api_request_' . md5( serialize( $this->slug . $this->api_data['license'] ) );
259
 
260
  // Get the transient where we store the api request for this plugin for 24 hours
261
  $edd_api_request_transient = $this->get_cached_version_info( $cache_key );
262
 
263
  //If we have no transient-saved value, run the API, set a fresh transient with the API value, and return that value too right now.
264
- if ( empty( $edd_api_request_transient ) ){
265
 
266
  $api_response = $this->api_request( 'plugin_information', $to_send );
267
 
@@ -276,6 +276,26 @@ class JPIBFI_EDD_SL_Plugin_Updater {
276
  $_data = $edd_api_request_transient;
277
  }
278
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
279
  return $_data;
280
  }
281
 
@@ -324,6 +344,7 @@ class JPIBFI_EDD_SL_Plugin_Updater {
324
  'license' => ! empty( $data['license'] ) ? $data['license'] : '',
325
  'item_name' => isset( $data['item_name'] ) ? $data['item_name'] : false,
326
  'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
 
327
  'slug' => $data['slug'],
328
  'author' => $data['author'],
329
  'url' => home_url(),
@@ -346,6 +367,12 @@ class JPIBFI_EDD_SL_Plugin_Updater {
346
  $request->banners = maybe_unserialize( $request->banners );
347
  }
348
 
 
 
 
 
 
 
349
  return $request;
350
  }
351
 
@@ -370,7 +397,8 @@ class JPIBFI_EDD_SL_Plugin_Updater {
370
  }
371
 
372
  $data = $edd_plugin_data[ $_REQUEST['slug'] ];
373
- $cache_key = md5( 'edd_plugin_' . sanitize_key( $_REQUEST['plugin'] ) . '_version_info' );
 
374
  $version_info = $this->get_cached_version_info( $cache_key );
375
 
376
  if( false === $version_info ) {
@@ -391,12 +419,19 @@ class JPIBFI_EDD_SL_Plugin_Updater {
391
  $version_info = json_decode( wp_remote_retrieve_body( $request ) );
392
  }
393
 
 
394
  if ( ! empty( $version_info ) && isset( $version_info->sections ) ) {
395
  $version_info->sections = maybe_unserialize( $version_info->sections );
396
  } else {
397
  $version_info = false;
398
  }
399
 
 
 
 
 
 
 
400
  $this->set_version_info_cache( $version_info, $cache_key );
401
 
402
  }
@@ -438,5 +473,4 @@ class JPIBFI_EDD_SL_Plugin_Updater {
438
  update_option( $cache_key, $data );
439
 
440
  }
441
-
442
  }
7
  * Allows plugins to use their own update API.
8
  *
9
  * @author Easy Digital Downloads
10
+ * @version 1.6.12
11
  */
12
  class JPIBFI_EDD_SL_Plugin_Updater {
13
 
39
  $this->slug = basename( $_plugin_file, '.php' );
40
  $this->version = $_api_data['version'];
41
  $this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false;
42
+ $this->beta = ! empty( $this->api_data['beta'] ) ? true : false;
43
+ $this->cache_key = md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) );
44
 
45
  $edd_plugin_data[ $this->slug ] = $this->api_data;
46
 
98
  $version_info = $this->get_cached_version_info();
99
 
100
  if ( false === $version_info ) {
101
+ $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => $this->beta ) );
102
 
103
  $this->set_version_info_cache( $version_info );
104
 
156
  $version_info = $this->get_cached_version_info();
157
 
158
  if ( false === $version_info ) {
159
+ $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => $this->beta ) );
160
 
161
  $this->set_version_info_cache( $version_info );
162
  }
255
  )
256
  );
257
 
258
+ $cache_key = 'edd_api_request_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) );
259
 
260
  // Get the transient where we store the api request for this plugin for 24 hours
261
  $edd_api_request_transient = $this->get_cached_version_info( $cache_key );
262
 
263
  //If we have no transient-saved value, run the API, set a fresh transient with the API value, and return that value too right now.
264
+ if ( empty( $edd_api_request_transient ) ) {
265
 
266
  $api_response = $this->api_request( 'plugin_information', $to_send );
267
 
276
  $_data = $edd_api_request_transient;
277
  }
278
 
279
+ // Convert sections into an associative array, since we're getting an object, but Core expects an array.
280
+ if ( isset( $_data->sections ) && ! is_array( $_data->sections ) ) {
281
+ $new_sections = array();
282
+ foreach ( $_data->sections as $key => $value ) {
283
+ $new_sections[ $key ] = $value;
284
+ }
285
+
286
+ $_data->sections = $new_sections;
287
+ }
288
+
289
+ // Convert banners into an associative array, since we're getting an object, but Core expects an array.
290
+ if ( isset( $_data->banners ) && ! is_array( $_data->banners ) ) {
291
+ $new_banners = array();
292
+ foreach ( $_data->banners as $key => $value ) {
293
+ $new_banners[ $key ] = $value;
294
+ }
295
+
296
+ $_data->banners = $new_banners;
297
+ }
298
+
299
  return $_data;
300
  }
301
 
344
  'license' => ! empty( $data['license'] ) ? $data['license'] : '',
345
  'item_name' => isset( $data['item_name'] ) ? $data['item_name'] : false,
346
  'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
347
+ 'version' => isset( $data['version'] ) ? $data['version'] : false,
348
  'slug' => $data['slug'],
349
  'author' => $data['author'],
350
  'url' => home_url(),
367
  $request->banners = maybe_unserialize( $request->banners );
368
  }
369
 
370
+ if( ! empty( $request->sections ) ) {
371
+ foreach( $request->sections as $key => $section ) {
372
+ $request->$key = (array) $section;
373
+ }
374
+ }
375
+
376
  return $request;
377
  }
378
 
397
  }
398
 
399
  $data = $edd_plugin_data[ $_REQUEST['slug'] ];
400
+ $beta = ! empty( $data['beta'] ) ? true : false;
401
+ $cache_key = md5( 'edd_plugin_' . sanitize_key( $_REQUEST['plugin'] ) . '_' . $beta . '_version_info' );
402
  $version_info = $this->get_cached_version_info( $cache_key );
403
 
404
  if( false === $version_info ) {
419
  $version_info = json_decode( wp_remote_retrieve_body( $request ) );
420
  }
421
 
422
+
423
  if ( ! empty( $version_info ) && isset( $version_info->sections ) ) {
424
  $version_info->sections = maybe_unserialize( $version_info->sections );
425
  } else {
426
  $version_info = false;
427
  }
428
 
429
+ if( ! empty( $version_info ) ) {
430
+ foreach( $version_info->sections as $key => $section ) {
431
+ $version_info->$key = (array) $section;
432
+ }
433
+ }
434
+
435
  $this->set_version_info_cache( $version_info, $cache_key );
436
 
437
  }
473
  update_option( $cache_key, $data );
474
 
475
  }
 
476
  }
includes/includes/options/jpibfi-advanced-options.php CHANGED
@@ -10,6 +10,7 @@ class JPIBFI_Advanced_Options extends JPIBFI_Options {
10
  'filter_the_excerpt_priority' => 10,
11
  'filter_post_thumbnail_html_on' => true,
12
  'filter_post_thumbnail_html_priority' => 10,
 
13
  );
14
 
15
  return $defaults;
@@ -27,6 +28,13 @@ class JPIBFI_Advanced_Options extends JPIBFI_Options {
27
  'filter_the_excerpt_priority' => 'int',
28
  'filter_post_thumbnail_html_on' => 'boolean',
29
  'filter_post_thumbnail_html_priority' => 'int',
 
30
  );
31
  }
 
 
 
 
 
 
32
  }
10
  'filter_the_excerpt_priority' => 10,
11
  'filter_post_thumbnail_html_on' => true,
12
  'filter_post_thumbnail_html_priority' => 10,
13
+ 'scroll_selector' => '',
14
  );
15
 
16
  return $defaults;
28
  'filter_the_excerpt_priority' => 'int',
29
  'filter_post_thumbnail_html_on' => 'boolean',
30
  'filter_post_thumbnail_html_priority' => 'int',
31
+ 'scroll_selector' => 'string',
32
  );
33
  }
34
+
35
+ function get_options_for_view() {
36
+ $options = $this->get();
37
+
38
+ return array( 'scroll_selector' => $options['scroll_selector'] );
39
+ }
40
  }
includes/public/class-jpibfi-client.php CHANGED
@@ -47,18 +47,16 @@ class JPIBFI_Client {
47
  return;
48
  }
49
 
50
- $deps = array( 'jquery' );
51
 
52
- wp_enqueue_script( 'jpibfi-script', $this->plugin_dir_url . 'js/jpibfi.client.js', $deps, $this->version, false );
53
-
54
- $selection_options = $this->selection_options->get();
55
- $selection_options['image_selector'] = apply_filters( 'jpibfi_image_selector', $selection_options['image_selector'] );
56
 
57
  $parameters_array = array(
58
  'hover' => array_merge(
59
  array( 'siteTitle' => esc_attr( get_bloginfo( 'name', 'display' ) ) ),
60
  $selection_options,
61
- $this->visual_options->get_options_for_view()
 
62
  ),
63
  );
64
  wp_localize_script( 'jpibfi-script', 'jpibfi_options', $parameters_array );
47
  return;
48
  }
49
 
50
+ wp_enqueue_script( 'jpibfi-script', $this->plugin_dir_url . 'js/jpibfi.client.js', array( 'jquery' ), $this->version, false );
51
 
52
+ $selection_options = $this->selection_options->get();
 
 
 
53
 
54
  $parameters_array = array(
55
  'hover' => array_merge(
56
  array( 'siteTitle' => esc_attr( get_bloginfo( 'name', 'display' ) ) ),
57
  $selection_options,
58
+ $this->visual_options->get_options_for_view(),
59
+ $this->advanced_options->get_options_for_view()
60
  ),
61
  );
62
  wp_localize_script( 'jpibfi-script', 'jpibfi_options', $parameters_array );
jquery-pin-it-button-for-images.php CHANGED
@@ -6,7 +6,7 @@ Description: Highlights images on hover and adds a "Pin It" button over them for
6
  Text Domain: jquery-pin-it-button-for-images
7
  Domain Path: /languages
8
  Author: Marcin Skrzypiec
9
- Version:2.2.9
10
  Author URI: https://highfiveplugins.com/
11
  */
12
 
@@ -18,7 +18,7 @@ if ( !class_exists( 'jQuery_Pin_It_Button_For_Images' ) ) {
18
  final class jQuery_Pin_It_Button_For_Images {
19
 
20
  function __construct() {
21
- $version = '2.2.9';
22
  require_once plugin_dir_path(__FILE__) . 'includes/jpibfi.php';
23
  new JPIBFI(__FILE__, $version);
24
  }
6
  Text Domain: jquery-pin-it-button-for-images
7
  Domain Path: /languages
8
  Author: Marcin Skrzypiec
9
+ Version:2.2.10
10
  Author URI: https://highfiveplugins.com/
11
  */
12
 
18
  final class jQuery_Pin_It_Button_For_Images {
19
 
20
  function __construct() {
21
+ $version = '2.2.10';
22
  require_once plugin_dir_path(__FILE__) . 'includes/jpibfi.php';
23
  new JPIBFI(__FILE__, $version);
24
  }
js/jpibfi.client.js CHANGED
@@ -1 +1 @@
1
- !function t(e,n,i){function r(a,u){if(!n[a]){if(!e[a]){var s="function"==typeof require&&require;if(!u&&s)return s(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return r(n?n:t)},c,c.exports,t,e,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.siteTitle,r=void 0===n?"":n;i(this,t),this.desc_funcs={img_title:function(t){return t.attr("title")},img_alt:function(t){return t.attr("alt")},post_title:function(t){return t.attr("data-jpibfi-post-title")},post_excerpt:function(t){return t.attr("data-jpibfi-post-excerpt")},img_description:function(t){return t.attr("data-jpibfi-description")},img_caption:function(t){return t.attr("data-jpibfi-caption")},site_title:function(){return r}}}return r(t,[{key:"getDescription",value:function(t,e){for(var n="",i=0;i<e.length&&!n;i++)n=this.desc_funcs[e[i]](t);return n||""}}]),t}();n["default"]=o},{}],2:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function(){function t(e){var n=this;i(this,t),this.flags={},this.pluginName=e;var r="undefined"!=typeof console&&"undefined"!=typeof console.log,o="undefined"!=typeof JSON&&"function"==typeof JSON.stringify;r?(this.logString=function(t){n.log(t)},this.logObject=o?function(t){n.log(JSON.stringify(t,null,4))}:function(t){return n.simplelogObject(t)}):(this.logString=function(){},this.logObject=function(){});var a=this.getQueryParams(document.location.search);Object.keys(a).forEach(function(t){var i=t.replace(e+"_","");n.setFlag(i,a[t])})}return r(t,[{key:"getFlag",value:function(t){return void 0!==this.flags[t]&&this.flags[t]}},{key:"getQueryParams",value:function(t){t=t.split("+").join(" ");for(var e={},n=void 0,i=/[?&]?([^=]+)=([^&]*)/g;n=i.exec(t);)e[decodeURIComponent(n[1])]=decodeURIComponent(n[2]);return e}},{key:"log",value:function(t){this.getFlag("print")&&console.log(this.pluginName+" debug: "+t)}},{key:"setFlag",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.flags[t]=e}},{key:"simplelogObject",value:function(t){if(this.getFlag("print")){var e=Object.keys(t).filter(function(e){return t.hasOwnPrototype(e)}).map(function(e){return e+": "+t[e]+"\n"}).join();this.log(e)}}}]),t}();n["default"]=o},{}],3:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=t("./link-generator"),u=i(a),s=function(){function t(e,n){r(this,t),this.$=e,this.settings=n,this.linkGenerator=new u["default"](n),this.$element=this.$("<a />",{target:"_blank","class":"pinit-button "+n.pin_image});var i="default"===n.pin_image?"jpibfi-icon-"+n.pin_image_icon:"";this.$element.html('<span class="'+i+'"></span>'),"default"===n.pin_image&&this.$element.addClass("jpibfi-size-"+n.pin_image_size+" jpibfi-button-"+n.pin_image_button),this.size={height:n.pinImageHeight,width:n.pinImageWidth}}return o(t,[{key:"createButton",value:function(t){var e=this.$element.clone(!1);return e.attr("href",this.linkGenerator.generate(t)).click(function(t){t.preventDefault(),t.stopPropagation(),"#"!==t.currentTarget.href.slice(-1)&&window.open(t.currentTarget.href,"mw"+t.timeStamp,"left=20,top=20,width=500,height=500,toolbar=1,resizable=0")}),{$element:e,size:this.size}}}]),t}();n["default"]=s},{"./link-generator":6}],4:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function(){function t(e){var n=this;i(this,t),this.settings=e,this.disabledClasses=this.createClassList(e.disabled_classes),this.enabledClasses=this.createClassList(e.enabled_classes),this.updateSizeConstraints(),window.addEventListener("resize",function(){return n.updateSizeConstraints()},!1)}return r(t,[{key:"createClassList",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.split(";").filter(function(t){return!!t})}},{key:"imageEligible",value:function(t){return(0===this.enabledClasses.length||this.enabledClasses.some(function(e){return t.hasClass(e)}))&&!this.disabledClasses.some(function(e){return t.hasClass(e)})&&this.imageSizeIsOk(t)}},{key:"imageSizeIsOk",value:function(t){var e=t[0].clientWidth,n=t[0].clientHeight;return e>=this.minWidth&&n>=this.minHeight}},{key:"updateSizeConstraints",value:function(){this.minWidth=window.outerWidth<768?this.settings.min_image_width_small:this.settings.min_image_width,this.minHeight=window.outerWidth<768?this.settings.min_image_height_small:this.settings.min_image_height}}]),t}();n["default"]=o},{}],5:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=t("./show-on-hover-strategy"),u=i(a),s=function(){function t(e,n,i){r(this,t),this.settings=n,this.$=e,this.logger=i}return o(t,[{key:"init",value:function(){this.showStrategy=this.getStrategy(),this.showStrategy.start()}},{key:"getStrategy",value:function(){var t=null;return new(t=u["default"])(this.$,this.settings,this.logger)}}]),t}();n["default"]=s},{"./show-on-hover-strategy":8}],6:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=t("./../common/description-helper"),u=i(a),s=function(){function t(e){r(this,t),this.descriptionHelper=new u["default"]({siteTitle:e.siteTitle}),this.pinLinkedImages=e.pinLinkedImages,this.description_option=e.description_option,this.desc_funcs={img_title:function(t){return t.attr("title")},img_alt:function(t){return t.attr("alt")},post_title:function(t){return t.attr("data-jpibfi-post-title")},img_description:function(t){return t.attr("data-jpibfi-description")},img_caption:function(t){return t.attr("data-jpibfi-caption")},site_title:function(){return e.siteTitle}}}return o(t,[{key:"getDescription",value:function(t){return this.descriptionHelper.getDescription(t,this.description_option)}},{key:"getImage",value:function(t){var e=t.prop?t.prop("src"):t.attr("src");if(!this.pinLinkedImages)return e;var n=t.closest("a");if(0===n.length)return e;var i=e.split(".").pop(),r=n.attr("href"),o=r.split(".").pop();return o.toLowerCase()===i.toLowerCase()?r:e}},{key:"getUrl",value:function(t){return t.attr("data-jpibfi-post-url")||window.location.href}},{key:"generate",value:function(t){var e=encodeURIComponent(this.getDescription(t)),n=encodeURIComponent(this.getUrl(t)),i=encodeURIComponent(this.getImage(t));return"http://pinterest.com/pin/create/bookmarklet/?is_video=false&url="+n+"&media="+i+"&description="+e}}]),t}();n["default"]=s},{"./../common/description-helper":1}],7:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function(t,e,n,i){return t.top+i.top},a=function(t,e,n,i){return t.left+i.left},u=function(t,e,n,i){return e.top-n.height-i.bottom},s=function(t,e,n,i){return e.left-i.right-n.width},l=function(t,e,n){return t.top+((e.top-t.top)/2-n.height/2)},c=function(t,e,n){return t.left+((e.left-t.left)/2-n.width/2)},f=function(){function t(e,n){i(this,t),this.topF=e,this.leftF=n}return r(t,[{key:"calculate",value:function(t,e,n,i){return{top:this.topF(t,e,n,i),left:this.leftF(t,e,n,i)}}}]),t}(),p=function(){function t(e,n){i(this,t),this.margins=n,this.positionCalculator=this.getPositionCalculator(e)}return r(t,[{key:"getPositionCalculator",value:function(t){switch(t){case"top-left":return new f(o,a);case"top-right":return new f(o,s);case"bottom-left":return new f(u,a);case"bottom-right":return new f(u,s);default:return new f(l,c)}}},{key:"calculatePosition",value:function(t,e,n){return this.positionCalculator.calculate(t,e,n,this.margins)}}]),t}();n["default"]=p},{}],8:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),s=t("./show-strategy"),l=i(s),c=function(t){function e(){return r(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),u(e,[{key:"init",value:function(){var t=this,e=function(){return t.$(".jpibfi").closest("div").addClass("jpibfi_container")};e()}},{key:"start",value:function(){var t=this;this.init();var e="data-jpibfi-timeout",n=0,i=function(e){return t.$("a.pinit-button["+t.indexerAttr+'="'+e+'"]')},r=this;r.$(document).delegate(this.settings.image_selector,"mouseenter",function(){var t=r.$(this);if(r.imageFilter.imageEligible(t)){t.addClass("pinit-hover");var o=t.attr(r.indexerAttr);o||(o=n++,t.attr(r.indexerAttr,o));var a=i(o);0===a.length?!function(){var n=r.buttonGenerator.createButton(t),i=n.$element,a=n.size,u=t.offset(),s={top:u.top+t[0].clientHeight,left:u.left+t[0].clientWidth},l=r.positioner.calculatePosition(u,s,a);t.after(i),i.attr(r.indexerAttr,o).css("visibility","hidden").show().offset(l).css("visibility","visible").hover(function(){return clearTimeout(i.attr(e))},function(){return i.attr(e,setTimeout(function(){t.removeClass("pinit-hover"),i.remove()},100))})}():clearTimeout(a.attr(e))}}),r.$(document).delegate(this.settings.image_selector,"mouseleave",function(){if(!r.logger.getFlag("prevent_hide")){var t=r.$(this),n=t.attr(r.indexerAttr);if(n){var o=i(n);o.attr(e,setTimeout(function(){t.removeClass("pinit-hover"),o.remove()},100))}}})}}]),e}(l["default"]);n["default"]=c},{"./show-strategy":9}],9:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=t("./image-filter"),a=i(o),u=t("./button-generator"),s=i(u),l=t("./positioner"),c=i(l),f=function p(t,e,n){r(this,p),this.$=t,this.settings=e,this.logger=n,this.imageFilter=new a["default"](e),this.buttonGenerator=new s["default"](t,e);var i={left:e.button_margin_left,top:e.button_margin_top,right:e.button_margin_right,bottom:e.button_margin_bottom};this.positioner=new c["default"](e.button_position,i),this.indexerAttr="data-jpibfi-indexer"};n["default"]=f},{"./button-generator":3,"./image-filter":4,"./positioner":7}],10:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var r=t("./settings"),o=i(r),a=t("./debugger"),u=i(a),s=t("./hover"),l=i(s);!function(t){var e=window.jpibfi_options,n=new o["default"](t.extend({pageUrl:document.URL,pageTitle:document.title,pageDescription:t('meta[name="description"]').attr("content")||""},e.hover)),i=new u["default"]("jpibfi");window.jpibfi_debugger=i;var r=function(){var e=new l["default"](t,n,i);e.init()};t(document).ready(r)}(jQuery)},{"./debugger":2,"./hover":5,"./settings":11}],11:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function o(t){var e=this;i(this,o),Object.keys(t).forEach(function(n){e[n]=t[n]}),this.isTouchDevice="ontouchstart"in window||{}.hasOwnProperty.call(navigator,"maxTouchPoints")};n["default"]=r},{}]},{},[10]);
1
+ !function t(e,n,i){function r(a,u){if(!n[a]){if(!e[a]){var s="function"==typeof require&&require;if(!u&&s)return s(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return r(n?n:t)},c,c.exports,t,e,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.siteTitle,r=void 0===n?"":n;i(this,t),this.desc_funcs={img_title:function(t){return t.attr("title")},img_alt:function(t){return t.attr("alt")},post_title:function(t){return t.attr("data-jpibfi-post-title")},post_excerpt:function(t){return t.attr("data-jpibfi-post-excerpt")},img_description:function(t){return t.attr("data-jpibfi-description")},img_caption:function(t){return t.attr("data-jpibfi-caption")},site_title:function(){return r}}}return r(t,[{key:"getDescription",value:function(t,e){for(var n="",i=0;i<e.length&&!n;i++)n=this.desc_funcs[e[i]](t);return n||""}}]),t}();n["default"]=o},{}],2:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function(){function t(e){var n=this;i(this,t),this.flags={},this.pluginName=e;var r="undefined"!=typeof console&&"undefined"!=typeof console.log,o="undefined"!=typeof JSON&&"function"==typeof JSON.stringify;r?(this.logString=function(t){n.log(t)},this.logObject=o?function(t){n.log(JSON.stringify(t,null,4))}:function(t){return n.simplelogObject(t)}):(this.logString=function(){},this.logObject=function(){});var a=this.getQueryParams(document.location.search);Object.keys(a).forEach(function(t){var i=t.replace(e+"_","");n.setFlag(i,a[t])})}return r(t,[{key:"getFlag",value:function(t){return void 0!==this.flags[t]&&this.flags[t]}},{key:"getQueryParams",value:function(t){t=t.split("+").join(" ");for(var e={},n=void 0,i=/[?&]?([^=]+)=([^&]*)/g;n=i.exec(t);)e[decodeURIComponent(n[1])]=decodeURIComponent(n[2]);return e}},{key:"log",value:function(t){this.getFlag("print")&&console.log(this.pluginName+" debug: "+t)}},{key:"setFlag",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.flags[t]=e}},{key:"simplelogObject",value:function(t){if(this.getFlag("print")){var e=Object.keys(t).filter(function(e){return t.hasOwnPrototype(e)}).map(function(e){return e+": "+t[e]+"\n"}).join();this.log(e)}}}]),t}();n["default"]=o},{}],3:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=t("./link-generator"),u=i(a),s=function(){function t(e,n){r(this,t),this.$=e,this.settings=n,this.linkGenerator=new u["default"](n),this.$element=this.$("<a />",{target:"_blank","class":"pinit-button "+n.pin_image});var i="default"===n.pin_image?"jpibfi-icon-"+n.pin_image_icon:"";this.$element.html('<span class="'+i+'"></span>'),"default"===n.pin_image&&this.$element.addClass("jpibfi-size-"+n.pin_image_size+" jpibfi-button-"+n.pin_image_button),this.size={height:n.pinImageHeight,width:n.pinImageWidth}}return o(t,[{key:"createButton",value:function(t){var e=this.$element.clone(!1);return e.attr("href",this.linkGenerator.generate(t)).click(function(t){t.preventDefault(),t.stopPropagation(),"#"!==t.currentTarget.href.slice(-1)&&window.open(t.currentTarget.href,"mw"+t.timeStamp,"left=20,top=20,width=500,height=500,toolbar=1,resizable=0")}),{$element:e,size:this.size}}}]),t}();n["default"]=s},{"./link-generator":6}],4:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function(){function t(e){var n=this;i(this,t),this.settings=e,this.disabledClasses=this.createClassList(e.disabled_classes),this.enabledClasses=this.createClassList(e.enabled_classes),this.updateSizeConstraints(),window.addEventListener("resize",function(){return n.updateSizeConstraints()},!1)}return r(t,[{key:"createClassList",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.split(";").filter(function(t){return!!t})}},{key:"imageEligible",value:function(t){return(0===this.enabledClasses.length||this.enabledClasses.some(function(e){return t.hasClass(e)}))&&!this.disabledClasses.some(function(e){return t.hasClass(e)})&&this.imageSizeIsOk(t)}},{key:"imageSizeIsOk",value:function(t){var e=t[0].clientWidth,n=t[0].clientHeight;return e>=this.minWidth&&n>=this.minHeight}},{key:"updateSizeConstraints",value:function(){this.minWidth=window.outerWidth<768?this.settings.min_image_width_small:this.settings.min_image_width,this.minHeight=window.outerWidth<768?this.settings.min_image_height_small:this.settings.min_image_height}}]),t}();n["default"]=o},{}],5:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=t("./show-on-hover-strategy"),u=i(a),s=function(){function t(e,n,i){r(this,t),this.settings=n,this.$=e,this.logger=i}return o(t,[{key:"init",value:function(){this.showStrategy=this.getStrategy(),this.showStrategy.start()}},{key:"getStrategy",value:function(){var t=null;return new(t=u["default"])(this.$,this.settings,this.logger)}}]),t}();n["default"]=s},{"./show-on-hover-strategy":8}],6:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=t("./../common/description-helper"),u=i(a),s=function(){function t(e){r(this,t),this.descriptionHelper=new u["default"]({siteTitle:e.siteTitle}),this.pinLinkedImages=e.pinLinkedImages,this.description_option=e.description_option,this.desc_funcs={img_title:function(t){return t.attr("title")},img_alt:function(t){return t.attr("alt")},post_title:function(t){return t.attr("data-jpibfi-post-title")},img_description:function(t){return t.attr("data-jpibfi-description")},img_caption:function(t){return t.attr("data-jpibfi-caption")},site_title:function(){return e.siteTitle}}}return o(t,[{key:"getDescription",value:function(t){return this.descriptionHelper.getDescription(t,this.description_option)}},{key:"getImage",value:function(t){var e=t.prop?t.prop("src"):t.attr("src");if(!this.pinLinkedImages)return e;var n=t.closest("a[href]");if(0===n.length)return e;var i=e.split(".").pop(),r=n.attr("href"),o=r.split(".").pop();return o.toLowerCase()===i.toLowerCase()?r:e}},{key:"getUrl",value:function(t){return t.attr("data-jpibfi-post-url")||window.location.href}},{key:"generate",value:function(t){var e=encodeURIComponent(this.getDescription(t)),n=encodeURIComponent(this.getUrl(t)),i=encodeURIComponent(this.getImage(t));return"http://pinterest.com/pin/create/bookmarklet/?is_video=false&url="+n+"&media="+i+"&description="+e}}]),t}();n["default"]=s},{"./../common/description-helper":1}],7:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function(t,e,n,i){return t.top+i.top},a=function(t,e,n,i){return t.left+i.left},u=function(t,e,n,i){return e.top-n.height-i.bottom},s=function(t,e,n,i){return e.left-i.right-n.width},l=function(t,e,n){return t.top+((e.top-t.top)/2-n.height/2)},c=function(t,e,n){return t.left+((e.left-t.left)/2-n.width/2)},f=function(){function t(e,n){i(this,t),this.topF=e,this.leftF=n}return r(t,[{key:"calculate",value:function(t,e,n,i){return{top:this.topF(t,e,n,i),left:this.leftF(t,e,n,i)}}}]),t}(),p=function(){function t(e,n){i(this,t),this.margins=n,this.positionCalculator=this.getPositionCalculator(e)}return r(t,[{key:"getPositionCalculator",value:function(t){switch(t){case"top-left":return new f(o,a);case"top-right":return new f(o,s);case"bottom-left":return new f(u,a);case"bottom-right":return new f(u,s);default:return new f(l,c)}}},{key:"calculatePosition",value:function(t,e,n){return this.positionCalculator.calculate(t,e,n,this.margins)}}]),t}();n["default"]=p},{}],8:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),s=t("./show-strategy"),l=i(s),c=function(t){function e(){return r(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),u(e,[{key:"init",value:function(){var t=this,e=function(){return t.$(".jpibfi").closest("div").addClass("jpibfi_container")};e()}},{key:"start",value:function(){var t=this;this.init();var e="data-jpibfi-timeout",n=0,i=function(e){return t.$("a.pinit-button["+t.indexerAttr+'="'+e+'"]')},r=this;r.$(document).delegate(this.settings.image_selector,"mouseenter",function(){var t=r.$(this);if(r.imageFilter.imageEligible(t)){t.addClass("pinit-hover");var o=t.attr(r.indexerAttr);o||(o=n++,t.attr(r.indexerAttr,o));var a=i(o);0===a.length?!function(){var n=r.buttonGenerator.createButton(t),i=n.$element,a=n.size,u=t.offset(),s={top:u.top+t[0].clientHeight,left:u.left+t[0].clientWidth},l=r.positioner.calculatePosition(u,s,a);t.after(i),i.attr(r.indexerAttr,o).css("visibility","hidden").show().offset(l).css("visibility","visible").hover(function(){return clearTimeout(i.attr(e))},function(){return i.attr(e,setTimeout(function(){t.removeClass("pinit-hover"),i.remove()},100))})}():clearTimeout(a.attr(e))}}),r.$(document).delegate(this.settings.image_selector,"mouseleave",function(){if(!r.logger.getFlag("prevent_hide")){var t=r.$(this),n=t.attr(r.indexerAttr);if(n){var o=i(n);o.attr(e,setTimeout(function(){t.removeClass("pinit-hover"),o.remove()},100))}}})}}]),e}(l["default"]);n["default"]=c},{"./show-strategy":9}],9:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=t("./image-filter"),a=i(o),u=t("./button-generator"),s=i(u),l=t("./positioner"),c=i(l),f=function p(t,e,n){r(this,p),this.$=t,this.settings=e,this.logger=n,this.imageFilter=new a["default"](e),this.buttonGenerator=new s["default"](t,e);var i={left:e.button_margin_left,top:e.button_margin_top,right:e.button_margin_right,bottom:e.button_margin_bottom};this.positioner=new c["default"](e.button_position,i),this.indexerAttr="data-jpibfi-indexer"};n["default"]=f},{"./button-generator":3,"./image-filter":4,"./positioner":7}],10:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var r=t("./settings"),o=i(r),a=t("./debugger"),u=i(a),s=t("./hover"),l=i(s);!function(t){var e=function(){var e=window.jpibfi_options,n=new o["default"](t.extend({pageUrl:document.URL,pageTitle:document.title,pageDescription:t('meta[name="description"]').attr("content")||""},e.hover)),i=new u["default"]("jpibfi");window.jpibfi_debugger=i;var r=new l["default"](t,n,i);r.init()};t(document).ready(e)}(jQuery)},{"./debugger":2,"./hover":5,"./settings":11}],11:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function o(t){var e=this;i(this,o),Object.keys(t).forEach(function(n){e[n]=t[n]}),this.isTouchDevice="ontouchstart"in window||{}.hasOwnProperty.call(navigator,"maxTouchPoints")};n["default"]=r},{}]},{},[10]);
languages/jquery-pin-it-button-for-images.pot CHANGED
@@ -27,7 +27,7 @@ msgstr ""
27
  msgid "Thank you for updating to the latest version! %s helps your readers share your images using Pinterest."
28
  msgstr ""
29
 
30
- #: includes/admin/JPIBFI_Welcome_Screen.php:91, includes/admin/jpibfi-admin.php:79, includes/admin/settings/jpibfi-visual-settings.php:39
31
  msgid "Settings"
32
  msgstr ""
33
 
@@ -115,7 +115,7 @@ msgstr ""
115
  msgid "If you're stuck and can't get the plugin to work the way you want it to, get help!"
116
  msgstr ""
117
 
118
- #: includes/admin/JPIBFI_Welcome_Screen.php:209, includes/admin/jpibfi-admin.php:211
119
  msgid "Documentation"
120
  msgstr ""
121
 
@@ -123,12 +123,12 @@ msgstr ""
123
  msgid "If you are having difficulties with some aspects of the plugin, the first place to look for help is <a href=\"%s\" target=\"_blank\">the documentation</a> of the plugin. Chances are you will find what you are looking for there."
124
  msgstr ""
125
 
126
- #: includes/admin/JPIBFI_Welcome_Screen.php:217, includes/admin/jpibfi-admin.php:219
127
  msgid "Support"
128
  msgstr ""
129
 
130
  #: includes/admin/JPIBFI_Welcome_Screen.php:221
131
- msgid "Users of the free version of the plugin can find support <a href=\"%s\" target=\"_blank\">in the support forum</a>. When posting to the support forum, make sure you include the URL of your website."
132
  msgstr ""
133
 
134
  #: includes/admin/JPIBFI_Welcome_Screen.php:233
@@ -136,25 +136,21 @@ msgid "Next steps"
136
  msgstr ""
137
 
138
  #: includes/admin/JPIBFI_Welcome_Screen.php:237
139
- msgid "In most cases, the plugin is ready to go without any configuration. If there is anything you would like to change, go to the <a href=\"%s\">Settings panel</a>."
140
  msgstr ""
141
 
142
- #: includes/admin/jpibfi-admin.php:253, includes/admin/settings/jpibfi-settings-base.php:59
143
  msgid "Save Changes"
144
  msgstr ""
145
 
146
- #: includes/admin/jpibfi-admin.php:265
147
  msgid "Saving changes ..."
148
  msgstr ""
149
 
150
- #: includes/admin/jpibfi-admin.php:321
151
  msgid "jQuery Pin It Button For Images Options"
152
  msgstr ""
153
 
154
- #: includes/admin/jpibfi-admin.php:371
155
- msgid "jQuery Pin It Button for Images Pro is available. <a class=\"button button-primary\" href=\"%1$s\" target=\"_blank\">Check it out &rarr;</a>"
156
- msgstr ""
157
-
158
  #: includes/admin/settings/jpibfi-advanced-settings.php:25
159
  msgid "Filters"
160
  msgstr ""
@@ -183,6 +179,14 @@ msgstr ""
183
  msgid "post_thumbnail_html priority"
184
  msgstr ""
185
 
 
 
 
 
 
 
 
 
186
  #: includes/admin/settings/jpibfi-import-export-settings.php:63
187
  msgid "The file did not upload properly. Please try again."
188
  msgstr ""
@@ -211,6 +215,78 @@ msgstr ""
211
  msgid "Import Settings"
212
  msgstr ""
213
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
214
  #: includes/admin/settings/jpibfi-selection-settings.php:27
215
  msgid "jQuery Pin It Button for Images Settings"
216
  msgstr ""
27
  msgid "Thank you for updating to the latest version! %s helps your readers share your images using Pinterest."
28
  msgstr ""
29
 
30
+ #: includes/admin/JPIBFI_Welcome_Screen.php:91, includes/admin/jpibfi-admin.php:73, includes/admin/settings/jpibfi-visual-settings.php:39
31
  msgid "Settings"
32
  msgstr ""
33
 
115
  msgid "If you're stuck and can't get the plugin to work the way you want it to, get help!"
116
  msgstr ""
117
 
118
+ #: includes/admin/JPIBFI_Welcome_Screen.php:209, includes/admin/jpibfi-admin.php:209
119
  msgid "Documentation"
120
  msgstr ""
121
 
123
  msgid "If you are having difficulties with some aspects of the plugin, the first place to look for help is <a href=\"%s\" target=\"_blank\">the documentation</a> of the plugin. Chances are you will find what you are looking for there."
124
  msgstr ""
125
 
126
+ #: includes/admin/JPIBFI_Welcome_Screen.php:217, includes/admin/jpibfi-admin.php:217, includes/admin/jpibfi-admin.php:237
127
  msgid "Support"
128
  msgstr ""
129
 
130
  #: includes/admin/JPIBFI_Welcome_Screen.php:221
131
+ msgid "Users of the Pro version can get support by sending an email to %s."
132
  msgstr ""
133
 
134
  #: includes/admin/JPIBFI_Welcome_Screen.php:233
136
  msgstr ""
137
 
138
  #: includes/admin/JPIBFI_Welcome_Screen.php:237
139
+ msgid "In most cases, the plugin is ready to go without any configuration. You just need to <a href=\"%s\">activate your license</a> to get automatic updates. If there is anything you would like to change, go to the <a href=\"%s\">Settings panel</a>."
140
  msgstr ""
141
 
142
+ #: includes/admin/jpibfi-admin.php:269, includes/admin/settings/jpibfi-settings-base.php:59
143
  msgid "Save Changes"
144
  msgstr ""
145
 
146
+ #: includes/admin/jpibfi-admin.php:281
147
  msgid "Saving changes ..."
148
  msgstr ""
149
 
150
+ #: includes/admin/jpibfi-admin.php:337
151
  msgid "jQuery Pin It Button For Images Options"
152
  msgstr ""
153
 
 
 
 
 
154
  #: includes/admin/settings/jpibfi-advanced-settings.php:25
155
  msgid "Filters"
156
  msgstr ""
179
  msgid "post_thumbnail_html priority"
180
  msgstr ""
181
 
182
+ #: includes/admin/settings/jpibfi-advanced-settings.php:149
183
+ msgid "Scroll selector"
184
+ msgstr ""
185
+
186
+ #: includes/admin/settings/jpibfi-advanced-settings.php:151
187
+ msgid "Additional scroll selector for \"Always\" and \"Always on touch devices\" Show Button settings."
188
+ msgstr ""
189
+
190
  #: includes/admin/settings/jpibfi-import-export-settings.php:63
191
  msgid "The file did not upload properly. Please try again."
192
  msgstr ""
215
  msgid "Import Settings"
216
  msgstr ""
217
 
218
+ #: includes/admin/settings/jpibfi-license-settings.php:73, includes/admin/settings/jpibfi-license-settings.php:139, includes/admin/settings/jpibfi-license-settings.php:189
219
+ msgid "An error occurred, please try again."
220
+ msgstr ""
221
+
222
+ #: includes/admin/settings/jpibfi-license-settings.php:97
223
+ msgid "Your license key expired on %s."
224
+ msgstr ""
225
+
226
+ #: includes/admin/settings/jpibfi-license-settings.php:107
227
+ msgid "Your license key has been disabled."
228
+ msgstr ""
229
+
230
+ #: includes/admin/settings/jpibfi-license-settings.php:113
231
+ msgid "Invalid license."
232
+ msgstr ""
233
+
234
+ #: includes/admin/settings/jpibfi-license-settings.php:121
235
+ msgid "Your license is not active for this URL."
236
+ msgstr ""
237
+
238
+ #: includes/admin/settings/jpibfi-license-settings.php:127
239
+ msgid "This appears to be an invalid license key for %s."
240
+ msgstr ""
241
+
242
+ #: includes/admin/settings/jpibfi-license-settings.php:133
243
+ msgid "Your license key has reached its activation limit."
244
+ msgstr ""
245
+
246
+ #: includes/admin/settings/jpibfi-license-settings.php:165
247
+ msgid "License Activated."
248
+ msgstr ""
249
+
250
+ #: includes/admin/settings/jpibfi-license-settings.php:221
251
+ msgid "License deactivated."
252
+ msgstr ""
253
+
254
+ #: includes/admin/settings/jpibfi-license-settings.php:225
255
+ msgid "License deactivation failed."
256
+ msgstr ""
257
+
258
+ #: includes/admin/settings/jpibfi-license-settings.php:277
259
+ msgid "Plugin License"
260
+ msgstr ""
261
+
262
+ #: includes/admin/settings/jpibfi-license-settings.php:279
263
+ msgid "Action"
264
+ msgstr ""
265
+
266
+ #: includes/admin/settings/jpibfi-license-settings.php:281
267
+ msgid "Activate License"
268
+ msgstr ""
269
+
270
+ #: includes/admin/settings/jpibfi-license-settings.php:285
271
+ msgid "Deactivate License"
272
+ msgstr ""
273
+
274
+ #: includes/admin/settings/jpibfi-license-settings.php:289
275
+ msgid "License active"
276
+ msgstr ""
277
+
278
+ #: includes/admin/settings/jpibfi-license-settings.php:305
279
+ msgid "License"
280
+ msgstr ""
281
+
282
+ #: includes/admin/settings/jpibfi-license-settings.php:391
283
+ msgid "Expires %s"
284
+ msgstr ""
285
+
286
+ #: includes/admin/settings/jpibfi-license-settings.php:407
287
+ msgid "License Key"
288
+ msgstr ""
289
+
290
  #: includes/admin/settings/jpibfi-selection-settings.php:27
291
  msgid "jQuery Pin It Button for Images Settings"
292
  msgstr ""
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: mrsztuczkens, redearthdesign, brocheafoin, robertark
3
  Tags: pinterest, pin it, button, image, images, pinit, social media, hover, click, photo, photos
4
  Requires at least: 3.3.0
5
  Tested up to: 4.6.1
6
- Stable tag: 2.2.9
7
  License: GPLv2 or later
8
 
9
  Highlights images on hover and adds a Pinterest "Pin It" button over them for easy pinning.
@@ -68,6 +68,10 @@ Please report them in the plugin's support forum on Wordpress.org.
68
 
69
  == Changelog ==
70
 
 
 
 
 
71
  = 2.2.9 =
72
  * Released 2017-03-27
73
  * Fixed one major JS bug
@@ -321,6 +325,9 @@ Please report them in the plugin's support forum on Wordpress.org.
321
 
322
  == Upgrade Notice ==
323
 
 
 
 
324
  = 2.2.9 =
325
  * Fixed one major JS bug
326
 
3
  Tags: pinterest, pin it, button, image, images, pinit, social media, hover, click, photo, photos
4
  Requires at least: 3.3.0
5
  Tested up to: 4.6.1
6
+ Stable tag: 2.2.10
7
  License: GPLv2 or later
8
 
9
  Highlights images on hover and adds a Pinterest "Pin It" button over them for easy pinning.
68
 
69
  == Changelog ==
70
 
71
+ = 2.2.10 =
72
+ * Released 2017-04-21
73
+ * Minor JavaScript improvements
74
+
75
  = 2.2.9 =
76
  * Released 2017-03-27
77
  * Fixed one major JS bug
325
 
326
  == Upgrade Notice ==
327
 
328
+ = 2.2.10 =
329
+ * Minor JavaScript improvements
330
+
331
  = 2.2.9 =
332
  * Fixed one major JS bug
333