jQuery Pin It Button for Images - Version 2.3.0

Version Description

  • Released 2017-06-03
  • Moved client script to footer
  • Added warning if settings page does not work
Download this release

Release Info

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

Code changes from version 2.2.10 to 2.3.0

includes/admin/jpibfi-admin.php CHANGED
@@ -161,6 +161,7 @@ class JPIBFI_Admin {
161
<h2><?php _e( 'jQuery Pin It Button For Images Options', 'jquery-pin-it-button-for-images' ); ?></h2>
162
<div id="icon-plugins" class="icon32"></div>
163
<jpibfi settings-name="jpibfi_settings"></jpibfi>
164
</div>
165
<?php
166
}
@@ -176,21 +177,23 @@ class JPIBFI_Admin {
176
$module->save_settings( $_POST );
177
}
178
179
public function show_ad() {
180
global $hook_suffix;
181
- if ( $hook_suffix === $this->admin_screen_hook ) {
182
- ?>
183
- <div class="notice notice-success">
184
- <p>
185
- <?php printf(
186
- __( 'jQuery Pin It Button for Images Pro is available. <a class="button button-primary" href="%1$s" target="_blank">Check it out &rarr;</a>', 'jquery-pin-it-button-for-images' ),
187
- 'https://highfiveplugins.com/downloads/jquery-pin-it-button-for-images-pro/'
188
- );
189
- ?>
190
- </p>
191
- </div>
192
- <?php
193
}
194
}
195
196
function show_nags() {
161
<h2><?php _e( 'jQuery Pin It Button For Images Options', 'jquery-pin-it-button-for-images' ); ?></h2>
162
<div id="icon-plugins" class="icon32"></div>
163
<jpibfi settings-name="jpibfi_settings"></jpibfi>
164
+ <h3 id="jpibfi-error"><?php printf(__('If you cannot see the settings page, <a href="%s" target="_blank">click here</a>', 'jquery-pin-it-button-for-images'), 'https://highfiveplugins.com/jpibfi/jquery-pin-it-button-for-images-documentation/#Empty_settings_page'); ?></h3>
165
</div>
166
<?php
167
}
177
$module->save_settings( $_POST );
178
}
179
180
+
181
public function show_ad() {
182
global $hook_suffix;
183
+ if ( $hook_suffix !== $this->admin_screen_hook ) {
184
+ return;
185
}
186
+ ?>
187
+ <div class="notice notice-success">
188
+ <p>
189
+ <?php printf(
190
+ __( 'jQuery Pin It Button for Images Pro is available. <a class="button button-primary" href="%1$s" target="_blank">Check it out &rarr;</a>', 'jquery-pin-it-button-for-images' ),
191
+ 'https://highfiveplugins.com/downloads/jquery-pin-it-button-for-images-pro/'
192
+ );
193
+ ?>
194
+ </p>
195
+ </div>
196
+ <?php
197
}
198
199
function show_nags() {
includes/public/JPIBFI_Client_Helper.php ADDED
@@ -0,0 +1,34 @@
1
+ <?php
2
+
3
+ class JPIBFI_Client_Helper {
4
+
5
+ /**
6
+ * Returns URL address if available in the $css_property_value arg
7
+ *
8
+ * @param $css_property_value
9
+ *
10
+ * @return string|bool
11
+ */
12
+ static function get_url_from_css_property( $css_property_value ) {
13
+ $url_pattern = '/(?i)\b((?:https?:\/\/|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:\'\".,<>?«»“”‘’]))/i';
14
+ preg_match( $url_pattern, $css_property_value, $url);
15
+ return count($url) > 0 ? $url[0] : false;
16
+ }
17
+
18
+ /**
19
+ * Returns background url if available
20
+ *
21
+ * @param $style_attr_value
22
+ *
23
+ * @return bool|string
24
+ */
25
+ static public function get_background_image_url( $style_attr_value ) {
26
+ $background_attr_pattern = '/(background|background-image)\s*:\s*([^;]+)\s*;?/i';
27
+ preg_match( $background_attr_pattern, $style_attr_value, $background_attr );
28
+ if ( count( $background_attr ) == 0 )
29
+ return false;
30
+ $property_value = $background_attr[2];
31
+ return self::get_url_from_css_property( $property_value );
32
+ }
33
+
34
+ }
includes/public/class-jpibfi-client.php CHANGED
@@ -21,6 +21,9 @@ class JPIBFI_Client {
21
add_action( 'wp_enqueue_scripts', array( $this, 'add_plugin_scripts' ) );
22
add_action( 'wp_head', array( $this, 'print_header_style' ) );
23
$this->add_conditional_filters();
24
}
25
26
private function add_conditional_filters() {
@@ -47,7 +50,7 @@ class JPIBFI_Client {
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
@@ -92,7 +95,7 @@ class JPIBFI_Client {
92
<?php echo $custom_button_span_css; ?>
93
}
94
95
- img.pinit-hover {
96
opacity: <?php echo (1 - $visual_options_js['transparency_value']); ?> !important;
97
filter: alpha(opacity=<?php echo (1 - $visual_options_js['transparency_value']) * 100; ?>) !important;
98
}
@@ -146,22 +149,16 @@ class JPIBFI_Client {
146
}
147
}
148
149
- if ( $get_description || $get_caption ) {
150
- $att = $this->get_attachment( $id, $src );
151
- if ( $att != null ) {
152
- if ( $get_description ) {
153
- $new_img .= sprintf( ' data-jpibfi-description="%s"', esc_attr( $att->post_content ) );
154
- }
155
-
156
- if ( $get_caption ) {
157
- $new_img .= sprintf( ' data-jpibfi-caption="%s"', esc_attr( $att->post_excerpt ) );
158
- }
159
- }
160
- }
161
162
$new_img .= sprintf( ' data-jpibfi-post-excerpt="%s"', esc_attr( wp_kses( $post->post_excerpt, array() ) ) );
163
$new_img .= sprintf( ' data-jpibfi-post-url="%s"', esc_attr( get_permalink() ) );
164
$new_img .= sprintf( ' data-jpibfi-post-title="%s"', esc_attr( get_the_title() ) );
165
$new_img .= ' >';
166
$content = str_replace( $img[0], $new_img, $content );
167
}
@@ -184,6 +181,7 @@ class JPIBFI_Client {
184
return '<input class="jpibfi" type="hidden">' . $content . $jscript;
185
}
186
187
//function gets the id of the image by searching for class with wp-image- prefix, otherwise returns empty string
188
function get_post_id_from_image_classes( $class_attribute ) {
189
$classes = preg_split( '/\s+/', $class_attribute, - 1, PREG_SPLIT_NO_EMPTY );
@@ -198,15 +196,19 @@ class JPIBFI_Client {
198
return '';
199
}
200
201
function get_attachment( $id, $src ) {
202
$result = is_numeric( $id ) ? get_post( $id ) : null;
203
204
- if ( null === $result ) {
205
- $id = $this->get_attachment_id_by_url( $src );
206
- $result = $id !== 0 ? get_post( $id ) : null;
207
- }
208
-
209
- return $result;
210
}
211
212
/**
21
add_action( 'wp_enqueue_scripts', array( $this, 'add_plugin_scripts' ) );
22
add_action( 'wp_head', array( $this, 'print_header_style' ) );
23
$this->add_conditional_filters();
24
+
25
+ //load dependency
26
+ require_once 'JPIBFI_Client_Helper.php';
27
}
28
29
private function add_conditional_filters() {
50
return;
51
}
52
53
+ wp_enqueue_script( 'jpibfi-script', $this->plugin_dir_url . 'js/jpibfi.client.js', array( 'jquery' ), $this->version, true );
54
55
$selection_options = $this->selection_options->get();
56
95
<?php echo $custom_button_span_css; ?>
96
}
97
98
+ .pinit-hover {
99
opacity: <?php echo (1 - $visual_options_js['transparency_value']); ?> !important;
100
filter: alpha(opacity=<?php echo (1 - $visual_options_js['transparency_value']) * 100; ?>) !important;
101
}
149
}
150
}
151
152
+ $att = $get_description || $get_caption ? $this->get_attachment( $id, $src ): null;
153
+ if ( $att != null ) {
154
+ $new_img .= $get_description ? sprintf( ' data-jpibfi-description="%s"', esc_attr( $att->post_content ) ): '';
155
+ $new_img .= $get_caption ? sprintf( ' data-jpibfi-caption="%s"', esc_attr( $att->post_excerpt ) ): '';
156
+ }
157
158
$new_img .= sprintf( ' data-jpibfi-post-excerpt="%s"', esc_attr( wp_kses( $post->post_excerpt, array() ) ) );
159
$new_img .= sprintf( ' data-jpibfi-post-url="%s"', esc_attr( get_permalink() ) );
160
$new_img .= sprintf( ' data-jpibfi-post-title="%s"', esc_attr( get_the_title() ) );
161
+ $new_img .= sprintf( ' data-jpibfi-src="%s"', esc_attr( $src ) );
162
$new_img .= ' >';
163
$content = str_replace( $img[0], $new_img, $content );
164
}
181
return '<input class="jpibfi" type="hidden">' . $content . $jscript;
182
}
183
184
+
185
//function gets the id of the image by searching for class with wp-image- prefix, otherwise returns empty string
186
function get_post_id_from_image_classes( $class_attribute ) {
187
$classes = preg_split( '/\s+/', $class_attribute, - 1, PREG_SPLIT_NO_EMPTY );
196
return '';
197
}
198
199
+ /**
200
+ * @param $id
201
+ * @param $src
202
+ *
203
+ * @return array|null|WP_Post
204
+ */
205
function get_attachment( $id, $src ) {
206
$result = is_numeric( $id ) ? get_post( $id ) : null;
207
+ if ( $result )
208
+ return $result;
209
210
+ $id = $this->get_attachment_id_by_url( $src );
211
+ return $id !== 0 ? get_post( $id ) : null;
212
}
213
214
/**
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.10
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.10';
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.3.0
10
Author URI: https://highfiveplugins.com/
11
*/
12
18
final class jQuery_Pin_It_Button_For_Images {
19
20
function __construct() {
21
+ $version = '2.3.0';
22
require_once plugin_dir_path(__FILE__) . 'includes/jpibfi.php';
23
new JPIBFI(__FILE__, $version);
24
}
js/jpibfi.admin.js CHANGED
@@ -34,6 +34,12 @@ Object.defineProperty(exports, "__esModule", {
34
35
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
36
37
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
38
39
var AppController = function () {
@@ -50,6 +56,8 @@ var AppController = function () {
50
value: function $onInit() {
51
this.config = window[this.settingsName];
52
this.linkService.init(this.config.page);
53
}
54
}]);
55
@@ -60,7 +68,7 @@ AppController.$inject = ['linkService'];
60
61
exports.default = AppController;
62
63
- },{}],3:[function(require,module,exports){
64
'use strict';
65
66
Object.defineProperty(exports, "__esModule", {
@@ -455,7 +463,7 @@ var SelectComponent = {
455
i18n: '<'
456
},
457
controller: _base2.default,
458
- template: '\n <h2>{{ $ctrl.i18n.title }}</h2>\n <table class="form-table">\n <tbody>\n <tr>\n <th><label for="image_selector">{{ ::$ctrl.settings.image_selector.label }}</label></th>\n <td>\n <editor-text args="$ctrl.settings.image_selector" on-update="$ctrl.update($event)"></editor-text>\n <p class="description" ng-bind-html="$ctrl.settings.image_selector.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label for="disabled_classes">{{ ::$ctrl.settings.disabled_classes.label }}</label></th>\n <td>\n <editor-text args="$ctrl.settings.disabled_classes" on-update="$ctrl.update($event)"></editor-text>\n <p class="description" ng-bind-html="$ctrl.settings.disabled_classes.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label for="enabled_classes">{{ ::$ctrl.settings.enabled_classes.label }}</label></th>\n <td>\n <editor-text args="$ctrl.settings.enabled_classes" on-update="$ctrl.update($event)"></editor-text>\n <p class="description" ng-bind-html="$ctrl.settings.enabled_classes.desc"></p>\n </td>\n </tr>\n <tr>\n <th>{{ ::$ctrl.i18n.image_resolution_label }}</th>\n <td>\n <p>\n <resolution height="$ctrl.settings.min_image_height_small" width="$ctrl.settings.min_image_width_small"\n update="$ctrl.update($event)" template="$ctrl.i18n.min_resolution_template_small">\n </resolution>\n </p>\n <p>\n <resolution height="$ctrl.settings.min_image_height" width="$ctrl.settings.min_image_width"\n update="$ctrl.update($event)" template="$ctrl.i18n.min_resolution_template">\n </resolution>\n </p>\n <p class="description" ng-bind-html="$ctrl.i18n.image_resolution_desc"></p>\n <p class="description" ng-bind-html="$ctrl.i18n.image_resolution_desc_2"></p>\n </td>\n </tr>\n <tr>\n <th>{{ ::$ctrl.i18n.show_on_field_label }}</th>\n <td>\n <p>\n <label for="show_on">{{ ::$ctrl.settings.show_on.label }}:</label><br/>\n <editor-textarea args="$ctrl.settings.show_on" on-update="$ctrl.update($event)"></editor-text>\n </p>\n <p>\n <label for="disable_on">{{ ::$ctrl.settings.disable_on.label }}:</label><br/>\n <editor-textarea args="$ctrl.settings.disable_on" on-update="$ctrl.update($event)"></editor-text>\n </p>\n <p class="description" ng-bind-html="$ctrl.i18n.show_on_field_desc"></p>\n </td>\n </tr>\n </tbody>\n </table>\n '
459
};
460
461
exports.default = SelectComponent;
34
35
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
36
37
+ var _angular = require('angular');
38
+
39
+ var _angular2 = _interopRequireDefault(_angular);
40
+
41
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
42
+
43
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
44
45
var AppController = function () {
56
value: function $onInit() {
57
this.config = window[this.settingsName];
58
this.linkService.init(this.config.page);
59
+
60
+ _angular2.default.element('#jpibfi-error').css({ display: 'none' });
61
}
62
}]);
63
68
69
exports.default = AppController;
70
71
+ },{"angular":42}],3:[function(require,module,exports){
72
'use strict';
73
74
Object.defineProperty(exports, "__esModule", {
463
i18n: '<'
464
},
465
controller: _base2.default,
466
+ template: '\n <h2>{{ $ctrl.i18n.title }}</h2>\n <table class="form-table">\n <tbody>\n <tr>\n <th><label for="image_selector">{{ ::$ctrl.settings.image_selector.label }}</label></th>\n <td>\n <editor-textarea args="$ctrl.settings.image_selector" on-update="$ctrl.update($event)"></editor-textarea>\n <p class="description" ng-bind-html="$ctrl.settings.image_selector.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label for="disabled_classes">{{ ::$ctrl.settings.disabled_classes.label }}</label></th>\n <td>\n <editor-text args="$ctrl.settings.disabled_classes" on-update="$ctrl.update($event)"></editor-text>\n <p class="description" ng-bind-html="$ctrl.settings.disabled_classes.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label for="enabled_classes">{{ ::$ctrl.settings.enabled_classes.label }}</label></th>\n <td>\n <editor-text args="$ctrl.settings.enabled_classes" on-update="$ctrl.update($event)"></editor-text>\n <p class="description" ng-bind-html="$ctrl.settings.enabled_classes.desc"></p>\n </td>\n </tr>\n <tr>\n <th>{{ ::$ctrl.i18n.image_resolution_label }}</th>\n <td>\n <p>\n <resolution height="$ctrl.settings.min_image_height_small" width="$ctrl.settings.min_image_width_small"\n update="$ctrl.update($event)" template="$ctrl.i18n.min_resolution_template_small">\n </resolution>\n </p>\n <p>\n <resolution height="$ctrl.settings.min_image_height" width="$ctrl.settings.min_image_width"\n update="$ctrl.update($event)" template="$ctrl.i18n.min_resolution_template">\n </resolution>\n </p>\n <p class="description" ng-bind-html="$ctrl.i18n.image_resolution_desc"></p>\n <p class="description" ng-bind-html="$ctrl.i18n.image_resolution_desc_2"></p>\n </td>\n </tr>\n <tr>\n <th>{{ ::$ctrl.i18n.show_on_field_label }}</th>\n <td>\n <p>\n <label for="show_on">{{ ::$ctrl.settings.show_on.label }}:</label><br/>\n <editor-textarea args="$ctrl.settings.show_on" on-update="$ctrl.update($event)"></editor-text>\n </p>\n <p>\n <label for="disable_on">{{ ::$ctrl.settings.disable_on.label }}:</label><br/>\n <editor-textarea args="$ctrl.settings.disable_on" on-update="$ctrl.update($event)"></editor-text>\n </p>\n <p class="description" ng-bind-html="$ctrl.i18n.show_on_field_desc"></p>\n </td>\n </tr>\n </tbody>\n </table>\n '
467
};
468
469
exports.default = SelectComponent;
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[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]);
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")||t.attr("data-jpibfi-title")},img_alt:function(t){return t.attr("alt")||t.attr("data-jpibfi-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")})}},{key:"getSize",value:function(){return 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}return o(t,[{key:"getDescription",value:function(t){return this.descriptionHelper.getDescription(t,this.description_option)}},{key:"getImage",value:function(t){var e=t.attr("data-jpibfi-src")||(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}(),h=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"]=h},{}],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=r.buttonGenerator.getSize(),a=t.offset(),u={top:a.top+t[0].clientHeight,left:a.left+t[0].clientWidth},s=r.positioner.calculatePosition(a,u,i);t.after(n),n.attr(r.indexerAttr,o).css("visibility","hidden").show().offset(s).css("visibility","visible").hover(function(){return clearTimeout(n.attr(e))},function(){return n.attr(e,setTimeout(function(){t.removeClass("pinit-hover"),n.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 h(t,e,n){r(this,h),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:73, 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:209
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: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,21 +136,29 @@ 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. 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 ""
@@ -215,78 +223,6 @@ 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 ""
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
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
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
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:327
155
+ msgid "If you cannot see the settings page, <a href=\"%s\" target=\"_blank\">click here</a>"
156
+ msgstr ""
157
+
158
+ #: includes/admin/jpibfi-admin.php:379
159
+ 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>"
160
+ msgstr ""
161
+
162
#: includes/admin/settings/jpibfi-advanced-settings.php:25
163
msgid "Filters"
164
msgstr ""
223
msgid "Import Settings"
224
msgstr ""
225
226
#: includes/admin/settings/jpibfi-selection-settings.php:27
227
msgid "jQuery Pin It Button for Images Settings"
228
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.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,6 +68,11 @@ Please report them in the plugin's support forum on Wordpress.org.
68
69
== Changelog ==
70
71
= 2.2.10 =
72
* Released 2017-04-21
73
* Minor JavaScript improvements
@@ -325,6 +330,9 @@ Please report them in the plugin's support forum on Wordpress.org.
325
326
== Upgrade Notice ==
327
328
= 2.2.10 =
329
* Minor JavaScript improvements
330
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.3.0
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.3.0 =
72
+ * Released 2017-06-03
73
+ * Moved client script to footer
74
+ * Added warning if settings page does not work
75
+
76
= 2.2.10 =
77
* Released 2017-04-21
78
* Minor JavaScript improvements
330
331
== Upgrade Notice ==
332
333
+ = 2.3.0 =
334
+ * Moved client script to footer, added warning for settings page error
335
+
336
= 2.2.10 =
337
* Minor JavaScript improvements
338