SEO SQUIRRLY™ - Version 12.1.10

Version Description

  • 07/25/2022 = Update - SLA compatibility with Bricks Website Builder Update - SLA compatibility with Thrive Architect Fix - DevKit import to prevent deactivate it Fix - Small bugs in Sitemap XML and JSON-LD Fix - Load Squirrly METAs later when Late Load Buffer is on for compatibility with Header & Footer plugin and AMP plugin Fix - Added Kenya on the Ranking list Fix - Don't remove duplicate line in robots.txt custom records Fix - Don't encode the separator from title and description
Download this release

Release Info

Developer cifi
Plugin Icon 128x128 SEO SQUIRRLY™
Version 12.1.10
Comparing to
See all releases

Code changes from version 12.1.09 to 12.1.10

controllers/Research.php CHANGED
@@ -154,14 +154,6 @@ class SQ_Controllers_Research extends SQ_Classes_FrontController
154
 
155
  public function suggested()
156
  {
157
- //Get the briefcase keywords
158
- if ($briefcase = SQ_Classes_RemoteController::getBriefcase()) {
159
- if (!is_wp_error($briefcase)) {
160
- if (isset($briefcase->keywords)) {
161
- $this->keywords = $briefcase->keywords;
162
- }
163
- }
164
- }
165
 
166
  $this->suggested = SQ_Classes_RemoteController::getKrFound();
167
 
154
 
155
  public function suggested()
156
  {
 
 
 
 
 
 
 
 
157
 
158
  $this->suggested = SQ_Classes_RemoteController::getKrFound();
159
 
controllers/Snippet.php CHANGED
@@ -15,6 +15,7 @@ class SQ_Controllers_Snippet extends SQ_Classes_FrontController
15
  public function __construct()
16
  {
17
  parent::__construct();
 
18
  add_action('admin_bar_menu', array($this, 'hookTopmenuFrontend'), 11);
19
 
20
  if (is_admin()) {
@@ -38,6 +39,7 @@ class SQ_Controllers_Snippet extends SQ_Classes_FrontController
38
  */
39
  public function init()
40
  {
 
41
  if (is_rtl()) {
42
  SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('sqbootstrap.rtl', array('trigger' => true, 'media' => 'all'));
43
  SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('rtl', array('trigger' => true, 'media' => 'all'));
@@ -131,6 +133,10 @@ class SQ_Controllers_Snippet extends SQ_Classes_FrontController
131
  return;
132
  }
133
 
 
 
 
 
134
  //If user set not to load Squirrly in frontend
135
  if (!SQ_Classes_Helpers_Tools::getOption('sq_use_frontend')) {
136
  return;
15
  public function __construct()
16
  {
17
  parent::__construct();
18
+
19
  add_action('admin_bar_menu', array($this, 'hookTopmenuFrontend'), 11);
20
 
21
  if (is_admin()) {
39
  */
40
  public function init()
41
  {
42
+
43
  if (is_rtl()) {
44
  SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('sqbootstrap.rtl', array('trigger' => true, 'media' => 'all'));
45
  SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('rtl', array('trigger' => true, 'media' => 'all'));
133
  return;
134
  }
135
 
136
+ if(SQ_Classes_Helpers_Tools::isAMPEndpoint()){
137
+ return false;
138
+ }
139
+
140
  //If user set not to load Squirrly in frontend
141
  if (!SQ_Classes_Helpers_Tools::getOption('sq_use_frontend')) {
142
  return;
core/BlockFeatures.php CHANGED
@@ -315,7 +315,7 @@ class SQ_Core_BlockFeatures extends SQ_Classes_BlockController
315
  'show' => (SQ_Classes_Helpers_Tools::isPluginInstalled('divi-builder/divi-builder.php') || SQ_Classes_Helpers_Tools::isThemeActive('Divi')),
316
  ),//Live Assistant Divi
317
  array(
318
- 'title' => "Thrive Architect (BETA)",
319
  'description' => "The SEO Live Assistant <strong>works on the front-end of Thrive Architect</strong>, just as you're creating or editing your Thrive Architect page.",
320
  'category' => "Assistants",
321
  'mainfeature' => false,
@@ -328,6 +328,20 @@ class SQ_Core_BlockFeatures extends SQ_Classes_BlockController
328
  'details' => 'https://howto12.squirrly.co/kb/squirrly-live-assistant/#thrive',
329
  'show' => SQ_Classes_Helpers_Tools::isPluginInstalled('thrive-visual-editor/thrive-visual-editor.php'),
330
  ),//Live Assistant Thrive Architect
 
 
 
 
 
 
 
 
 
 
 
 
 
 
331
  array(
332
  'title' => "Blogging Assistant",
333
  'description' => "Add relevant <strong>Copyright-Free images, Tweets, Wikis, Blog Excerpts</strong> in your posts.",
315
  'show' => (SQ_Classes_Helpers_Tools::isPluginInstalled('divi-builder/divi-builder.php') || SQ_Classes_Helpers_Tools::isThemeActive('Divi')),
316
  ),//Live Assistant Divi
317
  array(
318
+ 'title' => "Thrive Architect",
319
  'description' => "The SEO Live Assistant <strong>works on the front-end of Thrive Architect</strong>, just as you're creating or editing your Thrive Architect page.",
320
  'category' => "Assistants",
321
  'mainfeature' => false,
328
  'details' => 'https://howto12.squirrly.co/kb/squirrly-live-assistant/#thrive',
329
  'show' => SQ_Classes_Helpers_Tools::isPluginInstalled('thrive-visual-editor/thrive-visual-editor.php'),
330
  ),//Live Assistant Thrive Architect
331
+ array(
332
+ 'title' => "Bricks Website Builder (BETA)",
333
+ 'description' => "The SEO Live Assistant <strong>works on the front-end of Bricks Website Builder</strong>, just as you're creating or editing your Bricks page.",
334
+ 'category' => "Assistants",
335
+ 'mainfeature' => false,
336
+ 'option' => 'sq_sla_frontend',
337
+ 'active' => SQ_Classes_Helpers_Tools::getOption('sq_sla_frontend'),
338
+ 'optional' => true,
339
+ 'connection' => false,
340
+ 'logo' => 'fa-solid fa-message',
341
+ 'link' => SQ_Classes_Helpers_Tools::getAdminUrl('sq_assistant', 'settings'),
342
+ 'details' => 'https://howto12.squirrly.co/kb/squirrly-live-assistant/#bricks',
343
+ 'show' => SQ_Classes_Helpers_Tools::isThemeActive('bricks'),
344
+ ),//Live Assistant Bricks Website Builder
345
  array(
346
  'title' => "Blogging Assistant",
347
  'description' => "Add relevant <strong>Copyright-Free images, Tweets, Wikis, Blog Excerpts</strong> in your posts.",
core/Blocklogin.php CHANGED
@@ -26,14 +26,14 @@ class SQ_Core_Blocklogin extends SQ_Classes_BlockController
26
  {
27
  switch (SQ_Classes_Helpers_Tools::getValue('action')) {
28
  //login action
29
- case 'sq_login':
30
- $this->squirrlyLogin();
31
- break;
32
 
33
  //sign-up action
34
- case 'sq_register':
35
- $this->squirrlyRegister();
36
- break;
37
  }
38
  }
39
 
26
  {
27
  switch (SQ_Classes_Helpers_Tools::getValue('action')) {
28
  //login action
29
+ case 'sq_login':
30
+ $this->squirrlyLogin();
31
+ break;
32
 
33
  //sign-up action
34
+ case 'sq_register':
35
+ $this->squirrlyRegister();
36
+ break;
37
  }
38
  }
39
 
models/Compatibility.php CHANGED
@@ -268,46 +268,46 @@ class SQ_Models_Compatibility
268
 
269
 
270
 
271
- //Load the SLA for Divi Editor
272
- if (SQ_Classes_Helpers_Tools::isPluginInstalled('divi-builder/divi-builder.php') || SQ_Classes_Helpers_Tools::isThemeActive('Divi') ) {
273
 
274
- if (SQ_Classes_Helpers_Tools::getValue('et_fb')) {
275
- //activate frontend SLA
276
- add_filter('sq_load_frontend_sla', '__return_true');
277
 
278
- //load SLA in frontend for the page builder
279
- add_action('admin_bar_menu', function ($wp_admin_bar) {
280
- ob_start();
281
- SQ_Classes_ObjController::getClass('SQ_Models_LiveAssistant')->loadFrontent();
282
- SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('builders', array('trigger'=>true, 'media' => 'all'));
283
- $liveassistant = ob_get_clean();
284
 
285
- $wp_admin_bar->add_menu(array('id' => 'sq_postsquirrly', 'parent' => false, 'meta' => array('html' => $liveassistant, 'tabindex' => PHP_INT_MAX,),));
286
- });
 
 
287
 
288
  }
289
 
290
- }
 
291
 
292
- //Load the SLA for Bricks Editor
293
- // if (SQ_Classes_Helpers_Tools::isThemeActive('bricks') ) {
294
- //
295
- // if (SQ_Classes_Helpers_Tools::getValue('bricks') == 'run') {
296
- // //activate frontend SLA
297
- // add_filter('sq_load_frontend_sla', '__return_true');
298
- //
299
- // //activate SLA on frontend
300
- // add_action('bricks_body', function(){
301
- // if ( bricks_is_builder_main() ) {
302
- // SQ_Classes_ObjController::getClass('SQ_Models_LiveAssistant')->loadFrontent();
303
- // }else{
304
- // SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('builders');
305
- // }
306
- // });
307
- //
308
- // }
309
- //
310
- // }
311
  }
312
  }
313
 
268
 
269
 
270
 
271
+ //Load the SLA for Divi Editor
272
+ if (SQ_Classes_Helpers_Tools::isPluginInstalled('divi-builder/divi-builder.php') || SQ_Classes_Helpers_Tools::isThemeActive('Divi') ) {
273
 
274
+ if (SQ_Classes_Helpers_Tools::getValue('et_fb')) {
275
+ //activate frontend SLA
276
+ add_filter('sq_load_frontend_sla', '__return_true');
277
 
278
+ //load SLA in frontend for the page builder
279
+ add_action('admin_bar_menu', function ($wp_admin_bar) {
280
+ ob_start();
281
+ SQ_Classes_ObjController::getClass('SQ_Models_LiveAssistant')->loadFrontent();
282
+ SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('builders', array('trigger'=>true, 'media' => 'all'));
283
+ $liveassistant = ob_get_clean();
284
 
285
+ $wp_admin_bar->add_menu(array('id' => 'sq_postsquirrly', 'parent' => false, 'meta' => array('html' => $liveassistant, 'tabindex' => PHP_INT_MAX,),));
286
+ });
287
+
288
+ }
289
 
290
  }
291
 
292
+ //Load the SLA for Bricks Editor
293
+ if (SQ_Classes_Helpers_Tools::isThemeActive('bricks') ) {
294
 
295
+ if (SQ_Classes_Helpers_Tools::getValue('bricks') == 'run') {
296
+ //activate frontend SLA
297
+ add_filter('sq_load_frontend_sla', '__return_true');
298
+
299
+ //activate SLA on frontend
300
+ add_action('bricks_body', function(){
301
+ if ( bricks_is_builder_main() ) {
302
+ SQ_Classes_ObjController::getClass('SQ_Models_LiveAssistant')->loadFrontent();
303
+ }else{
304
+ SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('builders');
305
+ }
306
+ });
307
+
308
+ }
309
+
310
+ }
 
 
 
311
  }
312
  }
313
 
models/Frontend.php CHANGED
@@ -138,7 +138,7 @@ class SQ_Models_Frontend
138
  }
139
 
140
  //load squirrly metas last or first
141
- if(SQ_Classes_Helpers_Tools::getOption('sq_laterload')){
142
  $buffer = preg_replace('/(<\/head>)/si', $header_str . "\n" . "$1", $buffer, 1);
143
  }else{
144
  $buffer = preg_replace('/(<head(\s[^>]*|)>)/si', "$1" . "\n" . $header_str . "\n", $buffer, 1);
138
  }
139
 
140
  //load squirrly metas last or first
141
+ if(SQ_Classes_Helpers_Tools::getOption('sq_laterload') || SQ_Classes_Helpers_Tools::isAMPEndpoint()){
142
  $buffer = preg_replace('/(<\/head>)/si', $header_str . "\n" . "$1", $buffer, 1);
143
  }else{
144
  $buffer = preg_replace('/(<head(\s[^>]*|)>)/si', "$1" . "\n" . $header_str . "\n", $buffer, 1);
models/LiveAssistant.php CHANGED
@@ -137,10 +137,21 @@ class SQ_Models_LiveAssistant
137
 
138
  if (in_array($post->post_type, (array)$types)) {
139
  //Load the assistant for frontend
140
- wp_enqueue_script('jquery');
141
- wp_enqueue_script('jquery-ui-core');
142
- wp_enqueue_script('jquery-ui-draggable');
143
- wp_print_scripts(array('jquery', 'jquery-ui-core', 'jquery-ui-draggable'));
 
 
 
 
 
 
 
 
 
 
 
144
 
145
  //Load media in frontend
146
  $args = array('trigger'=>true);
137
 
138
  if (in_array($post->post_type, (array)$types)) {
139
  //Load the assistant for frontend
140
+ if (SQ_Classes_Helpers_Tools::isPluginInstalled('thrive-visual-editor/thrive-visual-editor.php')) {
141
+ wp_enqueue_script('jquery');
142
+ wp_enqueue_script('jquery-ui-core');
143
+ wp_enqueue_script('jquery-ui-draggable');
144
+ wp_print_scripts(array('jquery', 'jquery-ui-core', 'jquery-ui-draggable'));
145
+ }else{
146
+ if (!wp_script_is('jquery')) {
147
+ wp_enqueue_script('jquery');
148
+ }
149
+ //load the draggable script in post edit for the floating SLA
150
+ if (!wp_script_is('jquery-ui-core') || !wp_script_is('jquery-ui-draggable')) {
151
+ wp_enqueue_script("jquery-ui-core");
152
+ wp_enqueue_script("jquery-ui-draggable");
153
+ }
154
+ }
155
 
156
  //Load media in frontend
157
  $args = array('trigger'=>true);
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://plugin.squirrly.co/squirrly-seo-pricing/
4
  Tags: SEO, SEO Plugin, XML sitemap, WooCommerce SEO, Search Engine, Open Graph, Video Sitemap, Google News Sitemap, Rich Snippets, Robotx.txt, SEO Automation, Local SEO, SEO Content analysis, SEO Content, SEO Optimization, WordPress SEO, Yoast, Yoast Compatible, Yoast Import, SEO Redirection, Redirection, SEO Sitemap, SEO Caching, Meta Title, Meta Description, Performance, SEO Audit, SEO Keyword Research, SEO Rank Math import, Google Search Console, Schema
5
  Requires at least: 4.3
6
  Tested up to: 6.0
7
- Stable tag: 12.1.09
8
  Requires PHP: 7.0
9
  License: GPLv2 or later
10
 
@@ -255,10 +255,12 @@ SEO optimization has never been easier.
255
  > * Facebook Pixel advanced options for eCommerce
256
  > * Set User Roles to limit access to Squirrly SEO functionality for Authors, Editors, Shop Manager, etc.
257
  > * Translation Plugins Support — Squirrly works perfectly with popular translations plugins like WPML and Polylang.
258
- > * Elementor SEO
259
- > * Divi SEO
260
- > * Brizy SEO
261
- > * Oxygen SEO
 
 
262
  > * WooCommerce SEO
263
  > * Import SEO and Settings with just ONE click
264
 
@@ -667,6 +669,16 @@ Type a keyword to the right of the screen and start using Squirrly Seo. Enjoy!
667
  7. Squirrly SEO - SEO Briefcase
668
 
669
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
670
  = 12.1.09 - 07/15/2022 =
671
  Update - SLA compatibility with Divi Builder
672
  Update - SLA compatibility with Thrive Architect
4
  Tags: SEO, SEO Plugin, XML sitemap, WooCommerce SEO, Search Engine, Open Graph, Video Sitemap, Google News Sitemap, Rich Snippets, Robotx.txt, SEO Automation, Local SEO, SEO Content analysis, SEO Content, SEO Optimization, WordPress SEO, Yoast, Yoast Compatible, Yoast Import, SEO Redirection, Redirection, SEO Sitemap, SEO Caching, Meta Title, Meta Description, Performance, SEO Audit, SEO Keyword Research, SEO Rank Math import, Google Search Console, Schema
5
  Requires at least: 4.3
6
  Tested up to: 6.0
7
+ Stable tag: 12.1.10
8
  Requires PHP: 7.0
9
  License: GPLv2 or later
10
 
255
  > * Facebook Pixel advanced options for eCommerce
256
  > * Set User Roles to limit access to Squirrly SEO functionality for Authors, Editors, Shop Manager, etc.
257
  > * Translation Plugins Support — Squirrly works perfectly with popular translations plugins like WPML and Polylang.
258
+ > * Elementor Builder - Frontend SEO
259
+ > * Divi Builder - Frontend SEO
260
+ > * Brizy Builder - Frontend SEO
261
+ > * Oxygen Builder - Frontend SEO
262
+ > * Zion Builder - Frontend SEO
263
+ > * Thrive Architect Builder - Frontend SEO
264
  > * WooCommerce SEO
265
  > * Import SEO and Settings with just ONE click
266
 
669
  7. Squirrly SEO - SEO Briefcase
670
 
671
  == Changelog ==
672
+ = 12.1.10 - 07/25/2022 =
673
+ Update - SLA compatibility with Bricks Website Builder
674
+ Update - SLA compatibility with Thrive Architect
675
+ Fix - DevKit import to prevent deactivate it
676
+ Fix - Small bugs in Sitemap XML and JSON-LD
677
+ Fix - Load Squirrly METAs later when Late Load Buffer is on for compatibility with Header & Footer plugin and AMP plugin
678
+ Fix - Added Kenya on the Ranking list
679
+ Fix - Don't remove duplicate line in robots.txt custom records
680
+ Fix - Don't encode the separator from title and description
681
+
682
  = 12.1.09 - 07/15/2022 =
683
  Update - SLA compatibility with Divi Builder
684
  Update - SLA compatibility with Thrive Architect
squirrly.php CHANGED
@@ -8,7 +8,7 @@
8
  * Description: A.I.-based Private SEO Consultant. In a Plugin. Powered by Machine Learning and Cloud Services. Over 300 functionalities for SEO available when you need them.
9
  * Author: Squirrly
10
  * Author URI: https://plugin.squirrly.co
11
- * Version: 12.1.09
12
  * License: GPLv2 or later
13
  * License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
14
  * Text Domain: squirrly-seo
@@ -17,9 +17,9 @@
17
 
18
  if (!defined('SQ_VERSION')) {
19
  /* SET THE CURRENT VERSION ABOVE AND BELOW */
20
- define('SQ_VERSION', '12.1.09');
21
  //The last stable version
22
- define('SQ_STABLE_VERSION', '12.1.07');
23
  // Call config files
24
  try {
25
  include_once dirname(__FILE__) . '/config/config.php';
8
  * Description: A.I.-based Private SEO Consultant. In a Plugin. Powered by Machine Learning and Cloud Services. Over 300 functionalities for SEO available when you need them.
9
  * Author: Squirrly
10
  * Author URI: https://plugin.squirrly.co
11
+ * Version: 12.1.10
12
  * License: GPLv2 or later
13
  * License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
14
  * Text Domain: squirrly-seo
17
 
18
  if (!defined('SQ_VERSION')) {
19
  /* SET THE CURRENT VERSION ABOVE AND BELOW */
20
+ define('SQ_VERSION', '12.1.10');
21
  //The last stable version
22
+ define('SQ_STABLE_VERSION', '12.1.09');
23
  // Call config files
24
  try {
25
  include_once dirname(__FILE__) . '/config/config.php';
view/Assistant/Settings.php CHANGED
@@ -91,6 +91,7 @@
91
  SQ_Classes_Helpers_Tools::isPluginInstalled('oxygen/functions.php') ||
92
  SQ_Classes_Helpers_Tools::isPluginInstalled('divi-builder/divi-builder.php') ||
93
  SQ_Classes_Helpers_Tools::isThemeActive('Divi') ||
 
94
  SQ_Classes_Helpers_Tools::isPluginInstalled('js_composer/js_composer.php') ||
95
  SQ_Classes_Helpers_Tools::isPluginInstalled('zionbuilder/zionbuilder.php') ) { ?>
96
  <div class="col-12 row m-0 p-0">
@@ -105,7 +106,8 @@
105
  <div class="small text-black-50 ml-5 mt-1"><?php echo sprintf(esc_html__("Supports %s Elementor Builder %s plugin.", 'squirrly-seo'),'<a href="https://elementor.com/" target="_blank" class="font-weight-bold">','</a>'); ?></div>
106
  <div class="small text-black-50 ml-5 mt-1"><?php echo sprintf(esc_html__("Supports %s Oxygen Builder %s plugin.", 'squirrly-seo'),'<a href="https://oxygenbuilder.com/" target="_blank" class="font-weight-bold">','</a>'); ?></div>
107
  <div class="small text-black-50 ml-5 mt-1"><?php echo sprintf(esc_html__("Supports %s Divi Builder %s plugin.", 'squirrly-seo'),'<a href="https://www.elegantthemes.com/gallery/divi/" target="_blank" class="font-weight-bold">','</a>'); ?></div>
108
- <div class="small text-black-50 ml-5 mt-1"><?php echo sprintf(esc_html__("Supports %s Thrive Architect %s plugin (BETA).", 'squirrly-seo'),'<a href="https://thrivethemes.com/architect/" target="_blank" class="font-weight-bold">','</a>'); ?></div>
 
109
  </div>
110
  </div>
111
  </div>
91
  SQ_Classes_Helpers_Tools::isPluginInstalled('oxygen/functions.php') ||
92
  SQ_Classes_Helpers_Tools::isPluginInstalled('divi-builder/divi-builder.php') ||
93
  SQ_Classes_Helpers_Tools::isThemeActive('Divi') ||
94
+ SQ_Classes_Helpers_Tools::isThemeActive('bricks') ||
95
  SQ_Classes_Helpers_Tools::isPluginInstalled('js_composer/js_composer.php') ||
96
  SQ_Classes_Helpers_Tools::isPluginInstalled('zionbuilder/zionbuilder.php') ) { ?>
97
  <div class="col-12 row m-0 p-0">
106
  <div class="small text-black-50 ml-5 mt-1"><?php echo sprintf(esc_html__("Supports %s Elementor Builder %s plugin.", 'squirrly-seo'),'<a href="https://elementor.com/" target="_blank" class="font-weight-bold">','</a>'); ?></div>
107
  <div class="small text-black-50 ml-5 mt-1"><?php echo sprintf(esc_html__("Supports %s Oxygen Builder %s plugin.", 'squirrly-seo'),'<a href="https://oxygenbuilder.com/" target="_blank" class="font-weight-bold">','</a>'); ?></div>
108
  <div class="small text-black-50 ml-5 mt-1"><?php echo sprintf(esc_html__("Supports %s Divi Builder %s plugin.", 'squirrly-seo'),'<a href="https://www.elegantthemes.com/gallery/divi/" target="_blank" class="font-weight-bold">','</a>'); ?></div>
109
+ <div class="small text-black-50 ml-5 mt-1"><?php echo sprintf(esc_html__("Supports %s Thrive Architect %s plugin.", 'squirrly-seo'),'<a href="https://thrivethemes.com/architect/" target="_blank" class="font-weight-bold">','</a>'); ?></div>
110
+ <div class="small text-black-50 ml-5 mt-1"><?php echo sprintf(esc_html__("Supports %s Bricks Website Builder %s (BETA).", 'squirrly-seo'),'<a href="https://bricksbuilder.io/" target="_blank" class="font-weight-bold">','</a>'); ?></div>
111
  </div>
112
  </div>
113
  </div>
view/Onboarding/Step2.php CHANGED
@@ -73,7 +73,7 @@
73
  <div class="col-12 m-0 p-0 sq-switch sq-switch-sm">
74
  <input type="checkbox" id="sq_sitemap_attachment" name="sitemap[sitemap-attachment]" class="sq-switch" value="1" <?php echo(($sitemap['sitemap-attachment'][1] == 1) ? 'checked="checked"' : ''); ?> />
75
  <label for="sq_sitemap_attachment" class="ml-1"><?php echo esc_html__("Attachments", 'squirrly-seo'); ?></label>
76
- <div class="small text-black-50 ml-5"><?php echo esc_html__("Only recommended if you have a photography website.", 'squirrly-seo'); ?> <?php echo '<a href="' . SQ_Classes_ObjController::getClass('SQ_Controllers_Sitemaps')->getXmlUrl('sitemap-attachment') . '" target="_blank" style="font-size: 13px; text-decoration: none; color: #999;"><strong>' . SQ_Classes_ObjController::getClass('SQ_Controllers_Sitemaps')->getXmlUrl('sitemap-attachment') . '</strong></a>' ?></div>
77
  </div>
78
  </div>
79
  </div>
73
  <div class="col-12 m-0 p-0 sq-switch sq-switch-sm">
74
  <input type="checkbox" id="sq_sitemap_attachment" name="sitemap[sitemap-attachment]" class="sq-switch" value="1" <?php echo(($sitemap['sitemap-attachment'][1] == 1) ? 'checked="checked"' : ''); ?> />
75
  <label for="sq_sitemap_attachment" class="ml-1"><?php echo esc_html__("Attachments", 'squirrly-seo'); ?></label>
76
+ <div class="small text-black-50 ml-5"><?php echo esc_html__("Recommended if you have a photography website.", 'squirrly-seo'); ?> <?php echo '<a href="' . SQ_Classes_ObjController::getClass('SQ_Controllers_Sitemaps')->getXmlUrl('sitemap-attachment') . '" target="_blank" style="font-size: 13px; text-decoration: none; color: #999;"><strong>' . SQ_Classes_ObjController::getClass('SQ_Controllers_Sitemaps')->getXmlUrl('sitemap-attachment') . '</strong></a>' ?></div>
77
  </div>
78
  </div>
79
  </div>
view/Research/HistoryDetails.php CHANGED
@@ -29,16 +29,8 @@
29
  $view->kr->data = json_decode($view->kr->data);
30
  if (!empty($view->kr->data))
31
  foreach ($view->kr->data as $nr => $row) {
32
- $in_briefcase = false;
33
- if (!empty($view->keywords)) {
34
- foreach ($view->keywords as $krow) {
35
- if (trim(strtolower($krow->keyword)) == trim(strtolower($row->keyword))) {
36
- $in_briefcase = true;
37
- break;
38
- }
39
- }
40
- }
41
-
42
  ?>
43
  <tr class="<?php echo($in_briefcase ? 'bg-briefcase' : '') ?> " >
44
  <td nowrap="nowrap" style="width: 40%;"><?php echo esc_html($row->keyword) ?></td>
29
  $view->kr->data = json_decode($view->kr->data);
30
  if (!empty($view->kr->data))
31
  foreach ($view->kr->data as $nr => $row) {
32
+ //Check if the keyword is already in briefcase
33
+ $in_briefcase = (isset($row->in_briefcase) ? $row->in_briefcase : false);
 
 
 
 
 
 
 
 
34
  ?>
35
  <tr class="<?php echo($in_briefcase ? 'bg-briefcase' : '') ?> " >
36
  <td nowrap="nowrap" style="width: 40%;"><?php echo esc_html($row->keyword) ?></td>
view/Research/ResearchDetails.php CHANGED
@@ -9,17 +9,12 @@ if (!empty($view->kr)) {
9
  foreach ($view->kr as $nr => $row) {
10
  if (!isset($row->keyword)) continue;
11
 
12
- $in_briefcase = false;
13
- if (!empty($view->keywords)) {
14
- foreach ($view->keywords as $krow) {
15
- if (trim(strtolower($krow->keyword)) == trim(strtolower($row->keyword))) {
16
- $in_briefcase = true;
17
- break;
18
- }
19
- }
20
- }
21
  ?>
22
- <tr class="<?php echo($in_briefcase ? 'bg-briefcase' : '') ?> <?php echo($row->initial ? 'bg-selected' : '') ?>">
23
  <td style="width: 40%;"><?php echo(isset($row->keyword) ? SQ_Classes_Helpers_Sanitize::escapeKeyword($row->keyword) : '') ?></td>
24
  <td style="width: 4%;"><?php echo(isset($view->country) ? esc_html($view->country) : 'com') ?></td>
25
  <td style="width: 23%; color: <?php echo esc_attr($row->stats->sc->color) ?>"><?php echo(isset($row->stats->sc->text) ? '<span data-value="' . esc_attr($row->stats->sc->value) . '">' . esc_html($view->getReasearchStatsText('sc', $row->stats->sc->value)) . '</span>' : '') ?></td>
9
  foreach ($view->kr as $nr => $row) {
10
  if (!isset($row->keyword)) continue;
11
 
12
+ //Check if the keyword is already in briefcase and if it's the main keyword that was researched
13
+ $in_briefcase = (isset($row->in_briefcase) ? $row->in_briefcase : false);
14
+ $initial = (isset($row->initial) ? $row->initial : false);
15
+
 
 
 
 
 
16
  ?>
17
+ <tr class="<?php echo($in_briefcase ? 'bg-briefcase' : '') ?> <?php echo($initial ? 'bg-selected' : '') ?>">
18
  <td style="width: 40%;"><?php echo(isset($row->keyword) ? SQ_Classes_Helpers_Sanitize::escapeKeyword($row->keyword) : '') ?></td>
19
  <td style="width: 4%;"><?php echo(isset($view->country) ? esc_html($view->country) : 'com') ?></td>
20
  <td style="width: 23%; color: <?php echo esc_attr($row->stats->sc->color) ?>"><?php echo(isset($row->stats->sc->text) ? '<span data-value="' . esc_attr($row->stats->sc->value) . '">' . esc_html($view->getReasearchStatsText('sc', $row->stats->sc->value)) . '</span>' : '') ?></td>
view/Research/Suggested.php CHANGED
@@ -64,14 +64,8 @@
64
  }
65
  }
66
 
67
- $in_briefcase = false;
68
- if (!empty($view->keywords))
69
- foreach ($view->keywords as $krow) {
70
- if (trim(strtolower($krow->keyword)) == trim(strtolower($row->keyword))) {
71
- $in_briefcase = true;
72
- break;
73
- }
74
- }
75
  ?>
76
  <tr id="sq_row_<?php echo (int)$row->id ?>" class="<?php echo($in_briefcase ? 'bg-briefcase' : '') ?>">
77
  <td style="width: 280px;">
64
  }
65
  }
66
 
67
+ //Check if the keyword is already in briefcase
68
+ $in_briefcase = (isset($row->in_briefcase) ? $row->in_briefcase : false);
 
 
 
 
 
 
69
  ?>
70
  <tr id="sq_row_<?php echo (int)$row->id ?>" class="<?php echo($in_briefcase ? 'bg-briefcase' : '') ?>">
71
  <td style="width: 280px;">
view/SeoSettings/Jsonld.php CHANGED
@@ -406,7 +406,7 @@
406
  <option value=""></option>
407
  <option value="$" <?php echo(($jsonldLocal['priceRange'] == '$') ? 'selected="selected"' : ''); ?>>$</option>
408
  <option value="$$" <?php echo(($jsonldLocal['priceRange'] == '$$') ? 'selected="selected"' : ''); ?>>$$</option>
409
- <option value="$$$" <?php echo(($jsonldLocal['priceRange'] == '$$$') ? 'selected="selected"' : ''); ?>>$$</option>
410
  </select>
411
  </div>
412
  </div>
406
  <option value=""></option>
407
  <option value="$" <?php echo(($jsonldLocal['priceRange'] == '$') ? 'selected="selected"' : ''); ?>>$</option>
408
  <option value="$$" <?php echo(($jsonldLocal['priceRange'] == '$$') ? 'selected="selected"' : ''); ?>>$$</option>
409
+ <option value="$$$" <?php echo(($jsonldLocal['priceRange'] == '$$$') ? 'selected="selected"' : ''); ?>>$$$</option>
410
  </select>
411
  </div>
412
  </div>
view/SeoSettings/Tweaks.php CHANGED
@@ -146,12 +146,12 @@
146
  </div>
147
  </div>
148
  </div>
149
- <div class="col-12 row m-0 p-0 my-5 sq_advanced">
150
  <div class="checker col-12 row m-0 p-0">
151
  <div class="col-12 m-0 p-0 sq-switch sq-switch-sm">
152
  <input type="checkbox" id="sq_sitemap_attachment" name="sitemap[sitemap-attachment]" class="sq-switch" value="1" <?php echo(($sitemap['sitemap-attachment'][1] == 1) ? 'checked="checked"' : ''); ?> />
153
  <label for="sq_sitemap_attachment" class="ml-1"><?php echo esc_html__("Attachments", 'squirrly-seo'); ?></label>
154
- <div class="small text-black-50 ml-5"><?php echo esc_html__("Only recommended if you have a photography website.", 'squirrly-seo'); ?></div>
155
  <div class="small text-black-50 ml-5"><?php echo '<a href="' . SQ_Classes_ObjController::getClass('SQ_Controllers_Sitemaps')->getXmlUrl('sitemap-attachment') . '" target="_blank" style="font-size: 13px; text-decoration: none; color: #999;"><strong>' . SQ_Classes_ObjController::getClass('SQ_Controllers_Sitemaps')->getXmlUrl('sitemap-attachment') . '</strong></a>' ?></div>
156
  <?php
157
  $pname = 'attachment';
146
  </div>
147
  </div>
148
  </div>
149
+ <div class="col-12 row m-0 p-0 my-5">
150
  <div class="checker col-12 row m-0 p-0">
151
  <div class="col-12 m-0 p-0 sq-switch sq-switch-sm">
152
  <input type="checkbox" id="sq_sitemap_attachment" name="sitemap[sitemap-attachment]" class="sq-switch" value="1" <?php echo(($sitemap['sitemap-attachment'][1] == 1) ? 'checked="checked"' : ''); ?> />
153
  <label for="sq_sitemap_attachment" class="ml-1"><?php echo esc_html__("Attachments", 'squirrly-seo'); ?></label>
154
+ <div class="small text-black-50 ml-5"><?php echo esc_html__("Recommended if you have a photography website.", 'squirrly-seo'); ?></div>
155
  <div class="small text-black-50 ml-5"><?php echo '<a href="' . SQ_Classes_ObjController::getClass('SQ_Controllers_Sitemaps')->getXmlUrl('sitemap-attachment') . '" target="_blank" style="font-size: 13px; text-decoration: none; color: #999;"><strong>' . SQ_Classes_ObjController::getClass('SQ_Controllers_Sitemaps')->getXmlUrl('sitemap-attachment') . '</strong></a>' ?></div>
156
  <?php
157
  $pname = 'attachment';
view/assets/js/assistant/sq_frontend.min.js CHANGED
@@ -1 +1 @@
1
- (function($){"use strict";if($.isFunction($.fn.sq_frontend)){return}$.fn.sq_frontend=function(options){var $this=this;var settings=$.extend({positions:[],minimize_height:134,maximize_height:100,top:25,bottom:0},options);$.sq_fields=$.extend({wp_form:$(".metabox-location-normal").length>0?$(".metabox-location-normal"):$("#side-sortables"),sq_box_close:$.sq_config.div.find(".sq_box_close"),sq_box_minimize:$.sq_config.div.find(".sq_box_minimize"),sq_box_maximize:$.sq_config.div.find(".sq_box_maximize"),sq_button_squirrly:$(".edit__PinnedPluginIcon-hNdeXr")},$.sq_fields);$.expr.filters.slaoffscreen=function(el){var rect=el.getBoundingClientRect();return rect.x+rect.width<0||rect.y+rect.height<0||(rect.x>window.innerWidth||rect.y>window.innerHeight)};$this.init=function(){var dragposition="";$.sq_config.div.addClass("sq_sticky");$.sq_config.div.addClass("minimized");$.sq_fields.sq_box_minimize.hide();$.sq_fields.sq_box_close.show();$.sq_fields.sq_box_maximize.show();var positions=JSON.parse(localStorage.positions||"{}");$(function(){$.each(positions,function(id,pos){$.sq_config.div.css(pos)});$.sq_config.div.css("height",settings.minimize_height);$.sq_config.div.css("top","auto");if($.fn.draggable){$.sq_config.div.draggable({containment:"body",handle:".sq_header",scroll:true,axis:"x",stop:function(event,ui){positions[this.id]=ui.position;localStorage.positions=JSON.stringify(positions)}})}});$.sq_fields.sq_box_minimize.on("click",function(e){e.stopPropagation();$.sq_config.div.css("height",settings.minimize_height+"px");$.sq_config.div.css("bottom",settings.bottom+"px");$.sq_config.div.css("top","auto");$.sq_config.div.addClass("minimized");$.sq_config.div.scrollTop(0);$.sq_fields.sq_box_minimize.hide();$.sq_fields.sq_box_maximize.show()});$.sq_fields.sq_box_close.on("click",function(){$.sq_config.div.hide();$.sq_setCookie("sq_sla","off")});if($.sq_getCookie("sq_sla")==="off"){$.sq_fields.sq_box_close.trigger("click")}$.sq_fields.sq_box_maximize.on("click",function(){$.sq_config.div.show();if($.sq_config.div.hasClass("minimized")){$.sq_config.div.css("top",settings.top+"px");$.sq_config.div.css("height","auto");$.sq_config.div.css("bottom",0);$.sq_config.div.scrollTop(0);$.sq_config.div.removeClass("minimized");$.sq_fields.sq_box_minimize.show();$.sq_fields.sq_box_maximize.hide()}});$(".editor-writing-flow").css("height","auto");$(window).resize(function(){if(typeof $.sq_config.div!=="undefined"&&$.sq_config.div.is(":slaoffscreen")){$.sq_config.div.css("left","auto");$.sq_config.div.css("right","0px")}})};$this.one("seo.loaded",function(){$this.sq_VisualBuilder()});$this.one("seo.frontend.content_loaded",function(){SQ_DEBUG&&console.log("sq_frontend seo.loaded");if(!$(".components-squirrly-icon").length){$.sq_editor.createEditorButton("components-squirrly-icon")}$(".components-squirrly-icon").on("click",function(){$.sq_fields.sq_box_maximize.trigger("click");$.sq_setCookie("sq_sla","on");$(".components-squirrly-icon").hide()});$.sq_fields.sq_box_close.on("click",function(){$(".components-squirrly-icon").show()});if($.sq_getCookie("sq_sla")==="off"){$(".components-squirrly-icon").show()}else{$.sq_config.div.show()}$this.sq_listenBuilderChange();$this.trigger("seo.frontend.refresh");$this.trigger("seo.frontend.new_changes")});if($.sq_config.div.is(":slaoffscreen")){$.sq_config.div.css("left","auto");$.sq_config.div.css("right","0px")}return $this};$.fn.sq_listenBuilderChange=function(){var $this=this;if(!$.sq_blockseo){return}$this.on("seo.frontend.editor_loaded seo.frontend.new_changes",function(){SQ_DEBUG&&console.log("seo.frontend.new_changes");var ed=$.sq_editor.getFrontendEditor();if(ed){if(ed.getPageTitle()!==""){$.sq_fields.wp_input_title.val(ed.getPageTitle())}$.sq_blockseo.trigger("seo.refresh")}SQ_DEBUG&&console.log("seo.frontend.new_changes DONE")});$.sq_blockseo.on("seo.refresh_click",function(){$this.checkPostAjax()});$this.on("seo.frontend.page_saved",function(){SQ_DEBUG&&console.log("seo.frontend.page_saved");var ed=$.sq_editor.getFrontendEditor();if(ed){if($.sq_blockbriefcase){$.sq_blockbriefcase.trigger("briefcase.save")}var $sq_seo=[];$this.find('input[name="sq_seo[]"]').each(function(){$sq_seo.push(this.value)});$.post($.sq_config.ajaxurl,{action:"sq_ajax_save_post",sq_nonce:$.sq_config.sq_nonce,post_id:$.sq_config.postID,sq_keyword:$.sq_config.keyword,referer:"frontend",sq_seo:$sq_seo}).done(function(){$this.trigger("seo.frontend.new_changes")})}SQ_DEBUG&&console.log("seo.frontend.page_saved DONE")});$this.checkPostAjax=function(){return $.post($.sq_config.ajaxurl,{action:"sq_ajax_get_post",sq_nonce:$.sq_config.sq_nonce,post_id:$.sq_config.postID}).done(function(data){if(typeof data.url!=="undefined"){if(!$.sq_config.div.find("#new-post-slug").length){$.sq_config.div.append('<input type="hidden" id="new-post-slug" />')}$("#new-post-slug").val(data.url)}if(typeof data.post_title!=="undefined"){$.sq_fields.wp_input_title.val(data.post_title)}$this.trigger("seo.frontend.new_changes")})};if(!$.sq_config.div.find("#sq_post_title").length){$.sq_config.div.append('<input type="hidden" id="sq_post_title" />');$.sq_fields.wp_input_title=$("#sq_post_title");$this.checkPostAjax()}};$.fn.sq_VisualBuilder=function(){var $this=this;if(typeof window.sq_editor!=="undefined"){return window.sq_editor}var builderExists=false;var builderInUse="";var $builderContents=null;var $lastNumberOfNodes=0;var $currentNumberOfNodes=0;var $elementLoadingTime=null;var buildersInfo={elementor:{enabled:true,name:"elementor",hasIframe:true,iframeSelector:"#elementor-preview-iframe",parrentDiv:".elementor-editor-active"},WPBakery:{enabled:true,name:"wpbakery",hasIframe:true,iframeSelector:"#vc_inline-frame",parrentDiv:"#vc_editor"},bricks:{enabled:true,name:"bricks",hasIframe:true,iframeSelector:"#bricks-builder-iframe",parrentDiv:"#bricks-builder-iframe-wrapper"},thrive:{enabled:true,name:"thrive",hasIframe:true,iframeSelector:"#tve-editor-frame",parrentDiv:".tcb-editor-main"},divi:{enabled:true,name:"divi",hasIframe:true,iframeSelector:"#et-fb-app-frame",parrentDiv:".et_divi_builder"},oxygen:{enabled:true,name:"oxygen",hasIframe:true,iframeSelector:"#ct-artificial-viewport",parrentDiv:"#oxygen-ui"},zion:{enabled:true,name:"zion",hasIframe:true,iframeSelector:"#znpb-editor-iframe",parrentDiv:".znpb"}};var pageData={url:"",title:"",content:"",h1:"",headline:"",hasMultipleH1:false,images:""};var builderSelectorsSettings={preview:"",h1:"",container:"",containerWidget:"",containerWidgetImages:"",saveButton:"",saveAction:""};var currentNumberOfNodes=null;$this.init=function(){SQ_DEBUG&&console.log("checkBuilderExists");$this.checkBuilderExists()};$this.parseBuilders=function(){SQ_DEBUG&&console.log("Check parseBuilders "+$this.getBuilderName());switch($this.getBuilderName()){case"elementor":SQ_DEBUG&&console.log("Found "+$this.getBuilderName()+" builder");$this.parseElementor();break;case"oxygen":SQ_DEBUG&&console.log("Found "+$this.getBuilderName()+" builder");$this.parseOxygen();break;case"divi":SQ_DEBUG&&console.log("Found "+$this.getBuilderName()+" builder");if(typeof $.sq_config.div==="undefined"||typeof $.sq_params.low_density==="undefined"||typeof $.sq_fields.wp_title==="undefined"){$.sq_setConfig();$.sq_setParams();$.sq_setfields()}$this.parseDivi();break;case"wpbakery":SQ_DEBUG&&console.log("Found "+$this.getBuilderName()+" builder");$this.parseWPBakery();break;case"zion":SQ_DEBUG&&console.log("Found "+$this.getBuilderName()+" builder");$this.parseZion();break;case"thrive":SQ_DEBUG&&console.log("Found "+$this.getBuilderName()+" builder");$this.parseThrive();break;case"bricks":SQ_DEBUG&&console.log("Found "+$this.getBuilderName()+" builder");$this.parseBricks();break}};$this.checkBuilderExists=function(){SQ_DEBUG&&console.log("Looking for builders");$.each(Object.values(buildersInfo),function(index,builder){SQ_DEBUG&&console.log("Checking for: "+builder.name+" builder");if(builder.enabled===false){return}if(builder.hasIframe){if($this.elementExists(builder.iframeSelector)){SQ_DEBUG&&console.log("Found: "+builder.iframeSelector+" iframe");$(builder.iframeSelector).load(function(){SQ_DEBUG&&console.log("Loaded iframeSelector: "+builder.iframeSelector+" from builder "+builder.name);$this.setBuilderExists(builder.name);$builderContents=$(builder.iframeSelector).contents()[0];$this.parseBuilders()});$(builder.iframeSelector).ready(function(){SQ_DEBUG&&console.log("Ready iframeSelector: "+builder.iframeSelector+" from builder "+builder.name);$this.setBuilderExists(builder.name);$builderContents=$(builder.iframeSelector).contents()[0];$this.parseBuilders()});return false}}else if($this.elementExists(builder.parrentDiv)){$builderContents=$(builder.parrentDiv).contents();$this.setBuilderExists(builder.name);return false}})};$this.elementExists=function(element,where){var $whereToLook;if(typeof where==="undefined"){$whereToLook=$(document)}else{$whereToLook=$(where)}var $element=$whereToLook.find(element);if(typeof $element!=="undefined"&&$element.length>0){return $element}return false};$this.getBuilderInfo=function(builderName){return buildersInfo[builderName]};$this.waitForElementToDisplay=function(selector,where,time,callback){if($elementLoadingTime){clearTimeout($elementLoadingTime)}var $element=$this.elementExists(selector,where);if($element){callback()}else{$elementLoadingTime=setTimeout(function(){console.log("Waiting for: "+selector);$this.waitForElementToDisplay(selector,where,time,callback)},time)}};$this.parseElementor=function(){SQ_DEBUG&&console.log("Start parsing "+$this.getBuilderName());builderSelectorsSettings={preview:["#elementor-preview-iframe"],title:["h1.elementor-heading-title","h1.entry-title"],header:["h2","h3","h4","h5","h6"],container:[".elementor-section-wrap",".elementor-inner"],containerWidget:".elementor-widget-container",containerWidgetImages:["img"],saveAction:"save_builder"};$.each(builderSelectorsSettings.title,function(index,value){if($this.elementExists(value,$builderContents)){$this.setPageTitle($($builderContents).find(value+":first").text())}});$.each(builderSelectorsSettings.container,function(index,container){$this.waitForElementToDisplay(container,$builderContents,$.sq_config.delay_seo,function(){var $container=$($builderContents).find(container);var $elementorWidgets=$container.find(builderSelectorsSettings.containerWidget);$currentNumberOfNodes=$elementorWidgets.length;var textContainerToConcat="";var textContainerImagesToConcat="";$.each($elementorWidgets,function(){var $element=$(this).clone();if($element.find(builderSelectorsSettings.containerWidget).length){$element=$element.find(builderSelectorsSettings.containerWidget)}$.each(builderSelectorsSettings.title,function(index,value){if($this.getPageTitle()===""&&$this.elementExists(value,$element)){$this.setPageTitle($element.find(value+":first").text())}});$.each(builderSelectorsSettings.header,function(index,value){if($this.getPageHeadline()===""&&$this.elementExists(value,$element)){$this.setPageHeadline($element.find(value+":first").text())}});if($.isFunction($element.html)){textContainerToConcat+=$element.html()}else if(typeof $element.context!="undefined"){textContainerToConcat+=$element.context.innerHTML}$.each(builderSelectorsSettings.containerWidgetImages,function(index,value){var $imagesContainers=$element.find(value);if($imagesContainers.length>0){$.each($imagesContainers,function(){if($.isFunction($(this).html)){textContainerImagesToConcat+=$(this).html()}else if(typeof $(this).context!="undefined"){textContainerImagesToConcat+=$(this).context.innerHTML}});return false}});$element.remove()});$this.setPageContent(textContainerToConcat);$this.setPageImages(textContainerImagesToConcat);var triggerLoadInterval=setInterval(function(){if(!$("#elementor-loading").is(":visible")){clearInterval(triggerLoadInterval);$this.trigger("seo.frontend.content_loaded")}},1e3)})})};$this.parseOxygen=function(){SQ_DEBUG&&console.log("Start parsing "+$this.getBuilderName());builderSelectorsSettings={preview:["#ct-artificial-viewport"],title:["h1.ct-headline"],header:["div.bnb-subheading"],container:["#ct-builder"],containerWidget:".ct-inner-wrap",containerWidgetImages:[".ct-image"],saveAction:"oxygen-save-button",draftButton:"oxygen-save-button"};$.each(builderSelectorsSettings.title,function(index,value){if($this.elementExists(value,$builderContents)){$this.setPageTitle($($builderContents).find(value+":first").text())}});$.each(builderSelectorsSettings.container,function(index,container){$this.waitForElementToDisplay(container,$builderContents,$.sq_config.delay_seo,function(){var $container=$($builderContents).find(container);var $elementorWidgets=$container.find(builderSelectorsSettings.containerWidget);$currentNumberOfNodes=$elementorWidgets.length;var textContainerToConcat="";var textContainerImagesToConcat="";$.each($elementorWidgets,function(){var $element=$(this).clone();$.each(builderSelectorsSettings.title,function(index,value){if($this.getPageTitle()===""&&$this.elementExists(value,$element)){$this.setPageTitle($element.find(value+":first").text())}});$.each(builderSelectorsSettings.header,function(index,value){if($this.getPageHeadline()===""&&$this.elementExists(value,$element)){$this.setPageHeadline($element.find(value+":first").text())}});if($.isFunction($element.html)){textContainerToConcat+=$element.html()}else if(typeof $element.context!="undefined"){textContainerToConcat+=$element.context.innerHTML}$.each(builderSelectorsSettings.containerWidgetImages,function(index,value){var $imagesContainers=$element.find(value);if($imagesContainers.length>0){$.each($imagesContainers,function(){if($.isFunction($(this).html)){textContainerImagesToConcat+=$(this).html()}else if(typeof $(this).context!="undefined"){textContainerImagesToConcat+=$(this).context.innerHTML}});return false}});$element.remove()});$this.setPageContent(textContainerToConcat);$this.setPageImages(textContainerImagesToConcat);var triggerLoadInterval=setInterval(function(){if(!$(".ct-page-overlay").is(":visible")){clearInterval(triggerLoadInterval);$this.trigger("seo.frontend.content_loaded");if($(".oxygen-left-button-wrap").length&&$("button.components-squirrly-icon").length){var $icon=$("button.components-squirrly-icon");$(".oxygen-left-button-wrap").after($icon);$icon.css("position","initial");$icon.css("margin-left","2px")}}},1e3)})})};$this.parseDivi=function(){SQ_DEBUG&&console.log("Start parsing "+$this.getBuilderName());builderSelectorsSettings={preview:["#et-fb-app-frame"],title:["h1.entry-title","h1.et_pb_module_header"],header:["h2","h3","h4","h5","h6"],container:["#et-boc"],containerWidget:".et_pb_section",containerWidgetImages:[".et_pb_image_wrap"],saveButton:"et_fb_ajax_save",draftButton:"et-fb-button--save-draft"};$.each(builderSelectorsSettings.container,function(index,container){$this.waitForElementToDisplay(container,$builderContents,$.sq_config.delay_seo,function(){var $container=$($builderContents).find(container);var $elementorWidgets=$container.find(builderSelectorsSettings.containerWidget);$currentNumberOfNodes=$elementorWidgets.length;var textContainerToConcat="";var textContainerImagesToConcat="";$.each($elementorWidgets,function(){var $element=$(this).clone();$.each(builderSelectorsSettings.title,function(index,value){if($this.getPageTitle()===""&&$this.elementExists(value,$element)){$this.setPageTitle($element.find(value+":first").text())}});$.each(builderSelectorsSettings.header,function(index,value){if($this.getPageHeadline()===""&&$this.elementExists(value,$element)){$this.setPageHeadline($element.find(value+":first").text())}});$.each(builderSelectorsSettings.header,function(index,value){if($this.elementExists(value,$element)){$this.setPageHeadline($element.find(value+":first").text())}});if($.isFunction($element.html)){textContainerToConcat+=$element.html()}else if(typeof $element.context!="undefined"){textContainerToConcat+=$element.context.innerHTML}$.each(builderSelectorsSettings.containerWidgetImages,function(index,value){var $imagesContainers=$element.find(value);if($imagesContainers.length>0){$.each($imagesContainers,function(){if($.isFunction($(this).html)){textContainerImagesToConcat+=$(this).html()}else if(typeof $(this).context!="undefined"){textContainerImagesToConcat+=$(this).context.innerHTML}});return false}});$element.remove()});$this.setPageContent(textContainerToConcat);$this.setPageImages(textContainerImagesToConcat);var triggerLoadInterval=setInterval(function(){if(!$(".et-fb-page-preloading").length){clearInterval(triggerLoadInterval);$this.trigger("seo.frontend.content_loaded");if($(".et-fb-button--help").length&&$("button.components-squirrly-icon").length){var $icon=$("button.components-squirrly-icon");$(".et-fb-button--help").after($icon);$icon.css("position","initial");$icon.css("margin-right","5px")}}},1e3)})})};$this.parseWPBakery=function(){SQ_DEBUG&&console.log("Start parsing "+$this.getBuilderName());builderSelectorsSettings={preview:["#vc_inline-frame"],title:["h1.entry-title","h1.wp-block-post-title",".vc_container-block h1"],header:[".vc_container-block h2,.vc_container-block h3,.vc_container-block h4,.vc_container-block h5,.vc_container-block h6"],container:[".vc-main-sortable-container"],containerWidget:".wpb_wrapper",containerWidgetImages:[".vc_single_image-img",".wpb_gallery_slides"],saveAction:"vc_save"};$.each(builderSelectorsSettings.title,function(index,value){if($this.elementExists(value,$builderContents)){$this.setPageTitle($($builderContents).find(value+":first").text())}});$.each(builderSelectorsSettings.container,function(index,container){$this.waitForElementToDisplay(container,$builderContents,$.sq_config.delay_seo,function(){var $container=$($builderContents).find(container);var $elementorWidgets=$container.find(builderSelectorsSettings.containerWidget);$currentNumberOfNodes=$elementorWidgets.length;var textContainerToConcat="";var textContainerImagesToConcat="";$.each($elementorWidgets,function(){var $element=$(this).clone();$.each(builderSelectorsSettings.title,function(index,value){if($this.getPageTitle()===""&&$this.elementExists(value,$element)){$this.setPageTitle($element.find(value+":first").text())}});$.each(builderSelectorsSettings.header,function(index,value){if($this.getPageHeadline()===""&&$this.elementExists(value,$element)){$this.setPageHeadline($element.find(value+":first").text())}});if($.isFunction($element.html)){textContainerToConcat+=$element.html()}else if(typeof $element.context!="undefined"){textContainerToConcat+=$element.context.innerHTML}$.each(builderSelectorsSettings.containerWidgetImages,function(index,value){var $imagesContainers=$element.find(value);if($imagesContainers.length>0){$.each($imagesContainers,function(){if($.isFunction($(this).html)){textContainerImagesToConcat+=$(this).html()}else if(typeof $(this).context!="undefined"){textContainerImagesToConcat+=$(this).context.innerHTML}});return false}});$element.remove()});$this.setPageContent(textContainerToConcat);$this.setPageImages(textContainerImagesToConcat);var triggerLoadInterval=setInterval(function(){if(!$("#vc_preloader").is(":visible")){clearInterval(triggerLoadInterval);$this.trigger("seo.frontend.content_loaded");if(!$("body > #postsquirrly").length){$("#postsquirrly").appendTo("body")}if($(".vc_navbar-header").length&&$("button.components-squirrly-icon").length){var $icon=$("button.components-squirrly-icon");$(".vc_navbar-header").append($icon);$icon.css("position","initial");$icon.css("margin-top","10px")}}},1e3)})})};$this.parseThrive=function(){SQ_DEBUG&&console.log("Start parsing "+$this.getBuilderName());builderSelectorsSettings={preview:["#tve-editor-frame"],title:["h1"],header:["h2","h3","h4","h5","h6"],container:["#tve_editor"],containerWidget:".thrv_wrapper",containerWidgetImages:["img"],saveAction:"tcb_editor_ajax"};$.each(builderSelectorsSettings.container,function(index,container){$this.waitForElementToDisplay(container,$builderContents,$.sq_config.delay_seo,function(){var $container=$($builderContents).find(container);var $elementorWidgets=$container.children(builderSelectorsSettings.containerWidget);$currentNumberOfNodes=$elementorWidgets.length;var textContainerToConcat="";var textContainerImagesToConcat="";$.each($elementorWidgets,function(){var $element=$(this).clone();$.each(builderSelectorsSettings.title,function(index,value){if($this.getPageTitle()===""&&$this.elementExists(value,$element)){$this.setPageTitle($element.find(value+":first").text())}});$.each(builderSelectorsSettings.header,function(index,value){if($this.getPageHeadline()===""&&$this.elementExists(value,$element)){$this.setPageHeadline($element.find(value+":first").text())}});if($.isFunction($element.html)){textContainerToConcat+=$element.html()}else if(typeof $element.context!="undefined"){textContainerToConcat+=$element.context.innerHTML}$.each(builderSelectorsSettings.containerWidgetImages,function(index,value){var $imagesContainers=$element.find(value);if($imagesContainers.length>0){$.each($imagesContainers,function(){if($.isFunction($(this).html)){textContainerImagesToConcat+=$(this).html()}else if(typeof $(this).context!="undefined"){textContainerImagesToConcat+=$(this).context.innerHTML}});return false}});$element.remove()});$this.setPageContent(textContainerToConcat);$this.setPageImages(textContainerImagesToConcat);var triggerLoadInterval=setInterval(function(){if(!$("#tve-page-loader").is(":visible")){clearInterval(triggerLoadInterval);$this.trigger("seo.frontend.content_loaded");if($("#sidebar-bottom").length&&$("button.components-squirrly-icon").length){var $icon=$("button.components-squirrly-icon");$("#sidebar-bottom").prepend($icon);$icon.css("position","initial");$icon.css("margin-right","2px")}}},1e3)})})};$this.parseZion=function(){SQ_DEBUG&&console.log("Start parsing "+$this.getBuilderName());builderSelectorsSettings={preview:["#znpb-editor-iframe"],title:["h1.entry-title","h1.zb-el-zionHeading"],header:["h2.zb-el-zionHeading","h3.zb-el-zionHeading","h4.zb-el-zionHeading","h5.zb-el-zionHeading","h6.zb-el-zionHeading"],container:[".znpb-preview-page-wrapper"],containerWidget:".zb-section__innerWrapper",containerWidgetImages:[".znpb-element__wrapper img"],saveButton:".znpb-editor-header__page-save-wrapper--save",draftButton:".znpb-editor-header__page-save-wrapper"};$.each(builderSelectorsSettings.title,function(index,value){if($this.elementExists(value,$builderContents)){$this.setPageTitle($($builderContents).find(value+":first").text())}});$.each(builderSelectorsSettings.container,function(index,container){$this.waitForElementToDisplay(container,$builderContents,$.sq_config.delay_seo,function(){var $container=$($builderContents).find(container);var $elementorWidgets=$container.find(builderSelectorsSettings.containerWidget);$currentNumberOfNodes=$elementorWidgets.length;var textContainerToConcat="";var textContainerImagesToConcat="";$.each($elementorWidgets,function(){var $element=$(this).clone();$.each(builderSelectorsSettings.title,function(index,value){if($this.getPageTitle()===""&&$this.elementExists(value,$element)){$this.setPageTitle($element.find(value+":first").text())}});$.each(builderSelectorsSettings.header,function(index,value){if($this.getPageHeadline()===""&&$this.elementExists(value,$element)){$this.setPageHeadline($element.find(value+":first").text())}});if($.isFunction($element.html)){textContainerToConcat+=$element.html()}else if(typeof $element.context!="undefined"){textContainerToConcat+=$element.context.innerHTML}$.each(builderSelectorsSettings.containerWidgetImages,function(index,value){var $imagesContainers=$element.find(value);if($imagesContainers.length>0){$.each($imagesContainers,function(){if($.isFunction($(this).html)){textContainerImagesToConcat+=$(this).html()}else if(typeof $(this).context!="undefined"){textContainerImagesToConcat+=$(this).context.innerHTML}});return false}});$element.remove()});$this.setPageContent(textContainerToConcat);$this.setPageImages(textContainerImagesToConcat);var triggerLoadInterval=setInterval(function(){if(!$(".znpb-loading-wrapper-gif").is(":visible")){clearInterval(triggerLoadInterval);$this.trigger("seo.frontend.content_loaded");if($(".znpb-editor-header__first").length&&$("button.components-squirrly-icon").length){var $icon=$("button.components-squirrly-icon");$(".znpb-editor-header__first").append($icon);$icon.css("position","initial");$icon.css("margin-top","5px")}}},1e3)})})};$this.parseBricks=function(){SQ_DEBUG&&console.log("Start parsing "+$this.getBuilderName());builderSelectorsSettings={preview:["#bricks-builder-iframe"],title:["h1.entry-title","h1.brxe-post-title"],header:["h2","h3","h4","h5","h6"],container:[".brx-body"],containerWidget:".brx-container.root",containerWidgetImages:[".brxe-image"],saveAction:"bricks_save_post"};$.each(builderSelectorsSettings.container,function(index,container){$this.waitForElementToDisplay(container,$builderContents,$.sq_config.delay_seo,function(){var $container=$($builderContents).find(container);var $elementorWidgets=$container.find(builderSelectorsSettings.containerWidget);$currentNumberOfNodes=$elementorWidgets.length;var textContainerToConcat="";var textContainerImagesToConcat="";$.each($elementorWidgets,function(){var $element=$(this).clone();$.each(builderSelectorsSettings.title,function(index,value){if($this.getPageTitle()===""&&$this.elementExists(value,$element)){$this.setPageTitle($element.find(value+":first").text())}});$.each(builderSelectorsSettings.header,function(index,value){if($this.getPageHeadline()===""&&$this.elementExists(value,$element)){$this.setPageHeadline($element.find(value+":first").text())}});$.each(builderSelectorsSettings.header,function(index,value){if($this.elementExists(value,$element)){$this.setPageHeadline($element.find(value+":first").text())}});if($.isFunction($element.html)){textContainerToConcat+=$element.html()}else if(typeof $element.context!="undefined"){textContainerToConcat+=$element.context.innerHTML}$.each(builderSelectorsSettings.containerWidgetImages,function(index,value){var $imagesContainers=$element.find(value);if($imagesContainers.length>0){$.each($imagesContainers,function(){if($.isFunction($(this).html)){textContainerImagesToConcat+=$(this).html()}else if(typeof $(this).context!="undefined"){textContainerImagesToConcat+=$(this).context.innerHTML}});return false}});$element.remove()});$this.setPageContent(textContainerToConcat);$this.setPageImages(textContainerImagesToConcat);var triggerLoadInterval=setInterval(function(){if(!$(".et-fb-page-preloading").is(":visible")){clearInterval(triggerLoadInterval);$this.trigger("seo.frontend.content_loaded");if($("#bricks-toolbar").length&&$("button.components-squirrly-icon").length){var $icon=$("button.components-squirrly-icon");$("#bricks-toolbar .group-wrapper.left").append($icon);$icon.css("position","initial");$icon.css("margin-left","2px")}}},1e3)})})};$this.setBuilderExists=function(builderName){builderExists=true;builderInUse=builderName};$this.getBuilderExists=function(){return builderExists};$this.getBuilderName=function(){return builderInUse};$this.getBuilderContainer=function(){if($(builderSelectorsSettings.preview[0]).contents().find(builderSelectorsSettings.container[0]).length>0){return $(builderSelectorsSettings.preview[0]).contents().find(builderSelectorsSettings.container[0]).first()}if(builderSelectorsSettings.preview.length>0){return $(builderSelectorsSettings.preview[0]).contents().find("body")}return false};$this.getPageData=function(){return pageData};$this.getPageURL=function(){return pageData.url};$this.getPageTitle=function(){return pageData.title};$this.getMultipleH1=function(){return pageData.hasMultipleH1};$this.getH1=function(){return pageData.h1};$this.getPageContent=function(){return pageData.content};$this.getPageImages=function(){return pageData.images};$this.getPageHeadline=function(){return pageData.headline};$this.setPageURL=function(url){pageData.url=url};$this.setPageTitle=function(title){pageData.title=title};$this.setH1=function(h1Text){pageData.h1=h1Text};$this.setPageHeadline=function(headline){pageData.headline=headline};$this.setMultipleH1=function(flag){pageData.hasMultipleH1=flag};$this.setPageContent=function(content){pageData.content=content};$this.setPageImages=function(images){pageData.images=images};$this.triggerPageHasChanges=function(){SQ_DEBUG&&console.log("triggerPageHasChanges");$this.trigger("seo.frontend.refresh");$this.trigger("seo.frontend.new_changes")};$this.triggerButtonSaveClicked=function(){SQ_DEBUG&&console.log("triggerButtonSaveClicked");$this.trigger("seo.frontend.refresh");$this.trigger("seo.frontend.page_saved")};$this.on("seo.frontend.refresh",function(){$this.parseBuilders()});$(document).on("click","button",function(){if("#"+$(this).attr("id")===builderSelectorsSettings.saveButton){$this.triggerButtonSaveClicked()}if(typeof builderSelectorsSettings.saveButton!="undefined"){if(builderSelectorsSettings.saveButton.indexOf("#")===-1){if($(this).hasClass(builderSelectorsSettings.saveButton)){$this.triggerButtonSaveClicked()}}}});$(document).on("click","div",function(){if("#"+$(this).attr("id")===builderSelectorsSettings.draftButton){$this.triggerButtonSaveClicked()}if(typeof builderSelectorsSettings.saveButton!="undefined"){if(builderSelectorsSettings.saveButton.indexOf("#")===-1){if($(this).hasClass(builderSelectorsSettings.saveButton)){$this.triggerButtonSaveClicked()}}}if(typeof builderSelectorsSettings.draftButton!="undefined"){if(builderSelectorsSettings.draftButton.indexOf("#")===-1){if($(this).hasClass(builderSelectorsSettings.draftButton)){$this.triggerButtonSaveClicked()}}}});$(document).ajaxSend(function(event,jqxhr,settings){if(typeof settings.data!=="undefined"){if(typeof builderSelectorsSettings.saveAction!="undefined"){if(settings.data.indexOf(builderSelectorsSettings.saveAction)!==-1){$this.triggerButtonSaveClicked()}}}});setInterval(function(){$this.trigger("seo.frontend.refresh");SQ_DEBUG&&console.log("Check Blocks number: "+$lastNumberOfNodes+" = "+$currentNumberOfNodes);if($lastNumberOfNodes!==$currentNumberOfNodes){$lastNumberOfNodes=$currentNumberOfNodes;$this.triggerPageHasChanges()}},3e4);$.sq_blockseo.on("seo.task_loaded",function(){$(".sq_tasks").find("#sq_alt").remove()});$this.init();window.sq_editor=$this;$this.trigger("seo.frontend.editor_loaded");return $this}})(jQuery);
1
+ (function($){"use strict";if($.isFunction($.fn.sq_frontend)){return}$.fn.sq_frontend=function(options){var $this=this;var settings=$.extend({positions:[],minimize_height:134,maximize_height:100,top:25,bottom:0},options);$.sq_fields=$.extend({wp_form:$(".metabox-location-normal").length>0?$(".metabox-location-normal"):$("#side-sortables"),sq_box_close:$.sq_config.div.find(".sq_box_close"),sq_box_minimize:$.sq_config.div.find(".sq_box_minimize"),sq_box_maximize:$.sq_config.div.find(".sq_box_maximize"),sq_button_squirrly:$(".edit__PinnedPluginIcon-hNdeXr")},$.sq_fields);$.expr.filters.slaoffscreen=function(el){var rect=el.getBoundingClientRect();return rect.x+rect.width<0||rect.y+rect.height<0||(rect.x>window.innerWidth||rect.y>window.innerHeight)};$this.init=function(){var dragposition="";$.sq_config.div.addClass("sq_sticky");$.sq_config.div.addClass("minimized");$.sq_fields.sq_box_minimize.hide();$.sq_fields.sq_box_close.show();$.sq_fields.sq_box_maximize.show();var positions=JSON.parse(localStorage.positions||"{}");$(function(){$.each(positions,function(id,pos){$.sq_config.div.css(pos)});$.sq_config.div.css("height",settings.minimize_height);$.sq_config.div.css("top","auto");if($.fn.draggable){$.sq_config.div.draggable({containment:"body",handle:".sq_header",scroll:true,axis:"x",stop:function(event,ui){positions[this.id]=ui.position;localStorage.positions=JSON.stringify(positions)}})}});$.sq_fields.sq_box_minimize.on("click",function(e){e.stopPropagation();$.sq_config.div.css("height",settings.minimize_height+"px");$.sq_config.div.css("bottom",settings.bottom+"px");$.sq_config.div.css("top","auto");$.sq_config.div.addClass("minimized");$.sq_config.div.scrollTop(0);$.sq_fields.sq_box_minimize.hide();$.sq_fields.sq_box_maximize.show()});$.sq_fields.sq_box_close.on("click",function(){$.sq_config.div.hide();$.sq_setCookie("sq_sla","off")});if($.sq_getCookie("sq_sla")==="off"){$.sq_fields.sq_box_close.trigger("click")}$.sq_fields.sq_box_maximize.on("click",function(){$.sq_config.div.show();if($.sq_config.div.hasClass("minimized")){$.sq_config.div.css("top",settings.top+"px");$.sq_config.div.css("height","auto");$.sq_config.div.css("bottom",0);$.sq_config.div.scrollTop(0);$.sq_config.div.removeClass("minimized");$.sq_fields.sq_box_minimize.show();$.sq_fields.sq_box_maximize.hide()}});$(".editor-writing-flow").css("height","auto");$(window).resize(function(){if(typeof $.sq_config.div!=="undefined"&&$.sq_config.div.is(":slaoffscreen")){$.sq_config.div.css("left","auto");$.sq_config.div.css("right","0px")}})};$this.one("seo.loaded",function(){$this.sq_VisualBuilder()});$this.one("seo.frontend.content_loaded",function(){SQ_DEBUG&&console.log("sq_frontend seo.loaded");if(!$(".components-squirrly-icon").length){$.sq_editor.createEditorButton("components-squirrly-icon")}$(".components-squirrly-icon").on("click",function(){$.sq_fields.sq_box_maximize.trigger("click");$.sq_setCookie("sq_sla","on");$(".components-squirrly-icon").hide()});$.sq_fields.sq_box_close.on("click",function(){$(".components-squirrly-icon").show()});if($.sq_getCookie("sq_sla")==="off"){$(".components-squirrly-icon").show()}else{$.sq_config.div.show()}$this.sq_listenBuilderChange();$this.trigger("seo.frontend.refresh");$this.trigger("seo.frontend.new_changes")});if($.sq_config.div.is(":slaoffscreen")){$.sq_config.div.css("left","auto");$.sq_config.div.css("right","0px")}return $this};$.fn.sq_listenBuilderChange=function(){var $this=this;if(!$.sq_blockseo){return}$this.on("seo.frontend.editor_loaded seo.frontend.new_changes",function(){SQ_DEBUG&&console.log("seo.frontend.new_changes");var ed=$.sq_editor.getFrontendEditor();if(ed){if(ed.getPageTitle()!==""){$.sq_fields.wp_input_title.val(ed.getPageTitle())}$.sq_blockseo.trigger("seo.refresh")}SQ_DEBUG&&console.log("seo.frontend.new_changes DONE")});$.sq_blockseo.on("seo.refresh_click",function(){$this.checkPostAjax()});$this.on("seo.frontend.page_saved",function(){SQ_DEBUG&&console.log("seo.frontend.page_saved");var ed=$.sq_editor.getFrontendEditor();if(ed){if($.sq_blockbriefcase){$.sq_blockbriefcase.trigger("briefcase.save")}var $sq_seo=[];$this.find('input[name="sq_seo[]"]').each(function(){$sq_seo.push(this.value)});$.post($.sq_config.ajaxurl,{action:"sq_ajax_save_post",sq_nonce:$.sq_config.sq_nonce,post_id:$.sq_config.postID,sq_keyword:$.sq_config.keyword,referer:"frontend",sq_seo:$sq_seo}).done(function(){$this.trigger("seo.frontend.new_changes")})}SQ_DEBUG&&console.log("seo.frontend.page_saved DONE")});$this.checkPostAjax=function(){return $.post($.sq_config.ajaxurl,{action:"sq_ajax_get_post",sq_nonce:$.sq_config.sq_nonce,post_id:$.sq_config.postID}).done(function(data){if(typeof data.url!=="undefined"){if(!$.sq_config.div.find("#new-post-slug").length){$.sq_config.div.append('<input type="hidden" id="new-post-slug" />')}$("#new-post-slug").val(data.url)}if(typeof data.post_title!=="undefined"){$.sq_fields.wp_input_title.val(data.post_title)}$this.trigger("seo.frontend.new_changes")})};if(!$.sq_config.div.find("#sq_post_title").length){$.sq_config.div.append('<input type="hidden" id="sq_post_title" />');$.sq_fields.wp_input_title=$("#sq_post_title");$this.checkPostAjax()}};$.fn.sq_VisualBuilder=function(){var $this=this;if(typeof window.sq_editor!=="undefined"){return window.sq_editor}var builderExists=false;var builderInUse="";var $builderContents=null;var $lastNumberOfNodes=0;var $currentNumberOfNodes=0;var $elementLoadingTime=null;var buildersInfo={elementor:{enabled:true,name:"elementor",hasIframe:true,iframeSelector:"#elementor-preview-iframe",parrentDiv:".elementor-editor-active"},WPBakery:{enabled:true,name:"wpbakery",hasIframe:true,iframeSelector:"#vc_inline-frame",parrentDiv:"#vc_editor"},bricks:{enabled:true,name:"bricks",hasIframe:true,iframeSelector:"#bricks-builder-iframe",parrentDiv:"#bricks-builder-iframe-wrapper"},thrive:{enabled:true,name:"thrive",hasIframe:true,iframeSelector:"#tve-editor-frame",parrentDiv:".tcb-editor-main"},divi:{enabled:true,name:"divi",hasIframe:true,iframeSelector:"#et-fb-app-frame",parrentDiv:".et_divi_builder"},oxygen:{enabled:true,name:"oxygen",hasIframe:true,iframeSelector:"#ct-artificial-viewport",parrentDiv:"#oxygen-ui"},zion:{enabled:true,name:"zion",hasIframe:true,iframeSelector:"#znpb-editor-iframe",parrentDiv:".znpb"}};var pageData={url:"",title:"",content:"",h1:"",headline:"",hasMultipleH1:false,images:""};var builderSelectorsSettings={preview:"",h1:"",container:"",containerWidget:"",containerWidgetImages:"",saveButton:"",saveAction:""};var currentNumberOfNodes=null;$this.init=function(){SQ_DEBUG&&console.log("checkBuilderExists");$this.checkBuilderExists()};$this.parseBuilders=function(){SQ_DEBUG&&console.log("Check parseBuilders "+$this.getBuilderName());switch($this.getBuilderName()){case"elementor":SQ_DEBUG&&console.log("Found "+$this.getBuilderName()+" builder");$this.parseElementor();break;case"oxygen":SQ_DEBUG&&console.log("Found "+$this.getBuilderName()+" builder");$this.parseOxygen();break;case"divi":SQ_DEBUG&&console.log("Found "+$this.getBuilderName()+" builder");if(typeof $.sq_config.div==="undefined"||typeof $.sq_params.low_density==="undefined"||typeof $.sq_fields.wp_title==="undefined"){$.sq_setConfig();$.sq_setParams();$.sq_setfields()}$this.parseDivi();break;case"wpbakery":SQ_DEBUG&&console.log("Found "+$this.getBuilderName()+" builder");$this.parseWPBakery();break;case"zion":SQ_DEBUG&&console.log("Found "+$this.getBuilderName()+" builder");$this.parseZion();break;case"thrive":SQ_DEBUG&&console.log("Found "+$this.getBuilderName()+" builder");$this.parseThrive();break;case"bricks":SQ_DEBUG&&console.log("Found "+$this.getBuilderName()+" builder");$this.parseBricks();break}};$this.checkBuilderExists=function(){SQ_DEBUG&&console.log("Looking for builders");$.each(Object.values(buildersInfo),function(index,builder){SQ_DEBUG&&console.log("Checking for: "+builder.name+" builder");if(builder.enabled===false){return}if(builder.hasIframe){if($this.elementExists(builder.iframeSelector)){SQ_DEBUG&&console.log("Found: "+builder.iframeSelector+" iframe");$(builder.iframeSelector).ready(function(){SQ_DEBUG&&console.log("Ready iframeSelector: "+builder.iframeSelector+" from builder "+builder.name);$this.setBuilderExists(builder.name);$builderContents=$(builder.iframeSelector).contents()[0];$this.parseBuilders()});return false}}else if($this.elementExists(builder.parrentDiv)){$builderContents=$(builder.parrentDiv).contents();$this.setBuilderExists(builder.name);return false}})};$this.elementExists=function(element,where){var $whereToLook;if(typeof where==="undefined"){$whereToLook=$(document)}else{$whereToLook=$(where)}var $element=$whereToLook.find(element);if(typeof $element!=="undefined"&&$element.length>0){return $element}return false};$this.getBuilderInfo=function(builderName){return buildersInfo[builderName]};$this.waitForElementToDisplay=function(selector,where,time,callback){if($elementLoadingTime){clearTimeout($elementLoadingTime)}var $element=$this.elementExists(selector,where);if($element){callback()}else{$elementLoadingTime=setTimeout(function(){console.log("Waiting for: "+selector);$this.waitForElementToDisplay(selector,where,time,callback)},time)}};$this.parseElementor=function(){SQ_DEBUG&&console.log("Start parsing "+$this.getBuilderName());builderSelectorsSettings={preview:["#elementor-preview-iframe"],title:["h1.elementor-heading-title","h1.entry-title"],header:["h2","h3","h4","h5","h6"],container:[".elementor-section-wrap",".elementor-inner"],containerWidget:".elementor-widget-container",containerWidgetImages:["img"],saveAction:"save_builder"};$.each(builderSelectorsSettings.title,function(index,value){if($this.elementExists(value,$builderContents)){$this.setPageTitle($($builderContents).find(value+":first").text())}});$.each(builderSelectorsSettings.container,function(index,container){$this.waitForElementToDisplay(container,$builderContents,$.sq_config.delay_seo,function(){var $container=$($builderContents).find(container);var $elementorWidgets=$container.find(builderSelectorsSettings.containerWidget);$currentNumberOfNodes=$elementorWidgets.length;var textContainerToConcat="";var textContainerImagesToConcat="";$.each($elementorWidgets,function(){var $element=$(this).clone();if($element.find(builderSelectorsSettings.containerWidget).length){$element=$element.find(builderSelectorsSettings.containerWidget)}$.each(builderSelectorsSettings.title,function(index,value){if($this.getPageTitle()===""&&$this.elementExists(value,$element)){$this.setPageTitle($element.find(value+":first").text())}});$.each(builderSelectorsSettings.header,function(index,value){if($this.getPageHeadline()===""&&$this.elementExists(value,$element)){$this.setPageHeadline($element.find(value+":first").text())}});if($.isFunction($element.html)){textContainerToConcat+=$element.html()}else if(typeof $element.context!="undefined"){textContainerToConcat+=$element.context.innerHTML}$.each(builderSelectorsSettings.containerWidgetImages,function(index,value){var $imagesContainers=$element.find(value);if($imagesContainers.length>0){$.each($imagesContainers,function(){if($.isFunction($(this).html)){textContainerImagesToConcat+=$(this).html()}else if(typeof $(this).context!="undefined"){textContainerImagesToConcat+=$(this).context.innerHTML}});return false}});$element.remove()});$this.setPageContent(textContainerToConcat);$this.setPageImages(textContainerImagesToConcat);var triggerLoadInterval=setInterval(function(){if(!$("#elementor-loading").is(":visible")){clearInterval(triggerLoadInterval);$this.trigger("seo.frontend.content_loaded")}},1e3)})})};$this.parseOxygen=function(){SQ_DEBUG&&console.log("Start parsing "+$this.getBuilderName());builderSelectorsSettings={preview:["#ct-artificial-viewport"],title:["h1.ct-headline"],header:["div.bnb-subheading"],container:["#ct-builder"],containerWidget:".ct-inner-wrap",containerWidgetImages:[".ct-image"],saveAction:"oxygen-save-button",draftButton:"oxygen-save-button"};$.each(builderSelectorsSettings.title,function(index,value){if($this.elementExists(value,$builderContents)){$this.setPageTitle($($builderContents).find(value+":first").text())}});$.each(builderSelectorsSettings.container,function(index,container){$this.waitForElementToDisplay(container,$builderContents,$.sq_config.delay_seo,function(){var $container=$($builderContents).find(container);var $elementorWidgets=$container.find(builderSelectorsSettings.containerWidget);$currentNumberOfNodes=$elementorWidgets.length;var textContainerToConcat="";var textContainerImagesToConcat="";$.each($elementorWidgets,function(){var $element=$(this).clone();$.each(builderSelectorsSettings.title,function(index,value){if($this.getPageTitle()===""&&$this.elementExists(value,$element)){$this.setPageTitle($element.find(value+":first").text())}});$.each(builderSelectorsSettings.header,function(index,value){if($this.getPageHeadline()===""&&$this.elementExists(value,$element)){$this.setPageHeadline($element.find(value+":first").text())}});if($.isFunction($element.html)){textContainerToConcat+=$element.html()}else if(typeof $element.context!="undefined"){textContainerToConcat+=$element.context.innerHTML}$.each(builderSelectorsSettings.containerWidgetImages,function(index,value){var $imagesContainers=$element.find(value);if($imagesContainers.length>0){$.each($imagesContainers,function(){if($.isFunction($(this).html)){textContainerImagesToConcat+=$(this).html()}else if(typeof $(this).context!="undefined"){textContainerImagesToConcat+=$(this).context.innerHTML}});return false}});$element.remove()});$this.setPageContent(textContainerToConcat);$this.setPageImages(textContainerImagesToConcat);var triggerLoadInterval=setInterval(function(){if(!$(".ct-page-overlay").is(":visible")){clearInterval(triggerLoadInterval);$this.trigger("seo.frontend.content_loaded");if($(".oxygen-left-button-wrap").length&&$("button.components-squirrly-icon").length){var $icon=$("button.components-squirrly-icon");$(".oxygen-left-button-wrap").after($icon);$icon.css("position","initial");$icon.css("margin-left","2px")}}},1e3)})})};$this.parseDivi=function(){SQ_DEBUG&&console.log("Start parsing "+$this.getBuilderName());builderSelectorsSettings={preview:["#et-fb-app-frame"],title:["h1.entry-title","h1.et_pb_module_header"],header:["h2","h3","h4","h5","h6"],container:["#et-boc"],containerWidget:".et_pb_section",containerWidgetImages:[".et_pb_image_wrap"],saveButton:"et_fb_ajax_save",draftButton:"et-fb-button--save-draft"};$.each(builderSelectorsSettings.container,function(index,container){$this.waitForElementToDisplay(container,$builderContents,$.sq_config.delay_seo,function(){var $container=$($builderContents).find(container);var $elementorWidgets=$container.find(builderSelectorsSettings.containerWidget);$currentNumberOfNodes=$elementorWidgets.length;var textContainerToConcat="";var textContainerImagesToConcat="";$.each($elementorWidgets,function(){var $element=$(this).clone();$.each(builderSelectorsSettings.title,function(index,value){if($this.getPageTitle()===""&&$this.elementExists(value,$element)){$this.setPageTitle($element.find(value+":first").text())}});$.each(builderSelectorsSettings.header,function(index,value){if($this.getPageHeadline()===""&&$this.elementExists(value,$element)){$this.setPageHeadline($element.find(value+":first").text())}});$.each(builderSelectorsSettings.header,function(index,value){if($this.elementExists(value,$element)){$this.setPageHeadline($element.find(value+":first").text())}});if($.isFunction($element.html)){textContainerToConcat+=$element.html()}else if(typeof $element.context!="undefined"){textContainerToConcat+=$element.context.innerHTML}$.each(builderSelectorsSettings.containerWidgetImages,function(index,value){var $imagesContainers=$element.find(value);if($imagesContainers.length>0){$.each($imagesContainers,function(){if($.isFunction($(this).html)){textContainerImagesToConcat+=$(this).html()}else if(typeof $(this).context!="undefined"){textContainerImagesToConcat+=$(this).context.innerHTML}});return false}});$element.remove()});$this.setPageContent(textContainerToConcat);$this.setPageImages(textContainerImagesToConcat);var triggerLoadInterval=setInterval(function(){if(!$(".et-fb-page-preloading").length){clearInterval(triggerLoadInterval);$this.trigger("seo.frontend.content_loaded");if($(".et-fb-button--help").length&&$("button.components-squirrly-icon").length){var $icon=$("button.components-squirrly-icon");$(".et-fb-button--help").after($icon);$icon.css("position","initial");$icon.css("margin-right","5px")}}},1e3)})})};$this.parseWPBakery=function(){SQ_DEBUG&&console.log("Start parsing "+$this.getBuilderName());builderSelectorsSettings={preview:["#vc_inline-frame"],title:["h1.entry-title","h1.wp-block-post-title",".vc_container-block h1"],header:[".vc_container-block h2,.vc_container-block h3,.vc_container-block h4,.vc_container-block h5,.vc_container-block h6"],container:[".vc-main-sortable-container"],containerWidget:".wpb_wrapper",containerWidgetImages:[".vc_single_image-img",".wpb_gallery_slides"],saveAction:"vc_save"};$.each(builderSelectorsSettings.title,function(index,value){if($this.elementExists(value,$builderContents)){$this.setPageTitle($($builderContents).find(value+":first").text())}});$.each(builderSelectorsSettings.container,function(index,container){$this.waitForElementToDisplay(container,$builderContents,$.sq_config.delay_seo,function(){var $container=$($builderContents).find(container);var $elementorWidgets=$container.find(builderSelectorsSettings.containerWidget);$currentNumberOfNodes=$elementorWidgets.length;var textContainerToConcat="";var textContainerImagesToConcat="";$.each($elementorWidgets,function(){var $element=$(this).clone();$.each(builderSelectorsSettings.title,function(index,value){if($this.getPageTitle()===""&&$this.elementExists(value,$element)){$this.setPageTitle($element.find(value+":first").text())}});$.each(builderSelectorsSettings.header,function(index,value){if($this.getPageHeadline()===""&&$this.elementExists(value,$element)){$this.setPageHeadline($element.find(value+":first").text())}});if($.isFunction($element.html)){textContainerToConcat+=$element.html()}else if(typeof $element.context!="undefined"){textContainerToConcat+=$element.context.innerHTML}$.each(builderSelectorsSettings.containerWidgetImages,function(index,value){var $imagesContainers=$element.find(value);if($imagesContainers.length>0){$.each($imagesContainers,function(){if($.isFunction($(this).html)){textContainerImagesToConcat+=$(this).html()}else if(typeof $(this).context!="undefined"){textContainerImagesToConcat+=$(this).context.innerHTML}});return false}});$element.remove()});$this.setPageContent(textContainerToConcat);$this.setPageImages(textContainerImagesToConcat);var triggerLoadInterval=setInterval(function(){if(!$("#vc_preloader").is(":visible")){clearInterval(triggerLoadInterval);$this.trigger("seo.frontend.content_loaded");if(!$("body > #postsquirrly").length){$("#postsquirrly").appendTo("body")}if($(".vc_navbar-header").length&&$("button.components-squirrly-icon").length){var $icon=$("button.components-squirrly-icon");$(".vc_navbar-header").append($icon);$icon.css("position","initial");$icon.css("margin-top","10px")}}},1e3)})})};$this.parseThrive=function(){SQ_DEBUG&&console.log("Start parsing "+$this.getBuilderName());builderSelectorsSettings={preview:["#tve-editor-frame"],title:["h1"],header:["h2","h3","h4","h5","h6"],container:["#tve_editor"],containerWidget:".thrv_wrapper",containerWidgetImages:["img"],saveAction:"tcb_editor_ajax"};$.each(builderSelectorsSettings.container,function(index,container){$this.waitForElementToDisplay(container,$builderContents,$.sq_config.delay_seo,function(){var $container=$($builderContents).find(container);var $elementorWidgets=$container.children(builderSelectorsSettings.containerWidget);$currentNumberOfNodes=$elementorWidgets.length;var textContainerToConcat="";var textContainerImagesToConcat="";$.each($elementorWidgets,function(){var $element=$(this).clone();$.each(builderSelectorsSettings.title,function(index,value){if($this.getPageTitle()===""&&$this.elementExists(value,$element)){$this.setPageTitle($element.find(value+":first").text())}});$.each(builderSelectorsSettings.header,function(index,value){if($this.getPageHeadline()===""&&$this.elementExists(value,$element)){$this.setPageHeadline($element.find(value+":first").text())}});if($.isFunction($element.html)){textContainerToConcat+=$element.html()}else if(typeof $element.context!="undefined"){textContainerToConcat+=$element.context.innerHTML}$.each(builderSelectorsSettings.containerWidgetImages,function(index,value){var $imagesContainers=$element.find(value);if($imagesContainers.length>0){$.each($imagesContainers,function(){if($.isFunction($(this).html)){textContainerImagesToConcat+=$(this).html()}else if(typeof $(this).context!="undefined"){textContainerImagesToConcat+=$(this).context.innerHTML}});return false}});$element.remove()});$this.setPageContent(textContainerToConcat);$this.setPageImages(textContainerImagesToConcat);var triggerLoadInterval=setInterval(function(){if(!$("#tve-page-loader").is(":visible")){clearInterval(triggerLoadInterval);$this.trigger("seo.frontend.content_loaded");if($("#sidebar-bottom").length&&$("button.components-squirrly-icon").length){var $icon=$("button.components-squirrly-icon");$("#sidebar-bottom").prepend($icon);$icon.css("position","initial");$icon.css("margin-right","2px")}}},1e3)})})};$this.parseZion=function(){SQ_DEBUG&&console.log("Start parsing "+$this.getBuilderName());builderSelectorsSettings={preview:["#znpb-editor-iframe"],title:["h1.entry-title","h1.zb-el-zionHeading"],header:["h2.zb-el-zionHeading","h3.zb-el-zionHeading","h4.zb-el-zionHeading","h5.zb-el-zionHeading","h6.zb-el-zionHeading"],container:[".znpb-preview-page-wrapper"],containerWidget:".zb-section__innerWrapper",containerWidgetImages:[".znpb-element__wrapper img"],saveButton:".znpb-editor-header__page-save-wrapper--save",draftButton:".znpb-editor-header__page-save-wrapper"};$.each(builderSelectorsSettings.title,function(index,value){if($this.elementExists(value,$builderContents)){$this.setPageTitle($($builderContents).find(value+":first").text())}});$.each(builderSelectorsSettings.container,function(index,container){$this.waitForElementToDisplay(container,$builderContents,$.sq_config.delay_seo,function(){var $container=$($builderContents).find(container);var $elementorWidgets=$container.find(builderSelectorsSettings.containerWidget);$currentNumberOfNodes=$elementorWidgets.length;var textContainerToConcat="";var textContainerImagesToConcat="";$.each($elementorWidgets,function(){var $element=$(this).clone();$.each(builderSelectorsSettings.title,function(index,value){if($this.getPageTitle()===""&&$this.elementExists(value,$element)){$this.setPageTitle($element.find(value+":first").text())}});$.each(builderSelectorsSettings.header,function(index,value){if($this.getPageHeadline()===""&&$this.elementExists(value,$element)){$this.setPageHeadline($element.find(value+":first").text())}});if($.isFunction($element.html)){textContainerToConcat+=$element.html()}else if(typeof $element.context!="undefined"){textContainerToConcat+=$element.context.innerHTML}$.each(builderSelectorsSettings.containerWidgetImages,function(index,value){var $imagesContainers=$element.find(value);if($imagesContainers.length>0){$.each($imagesContainers,function(){if($.isFunction($(this).html)){textContainerImagesToConcat+=$(this).html()}else if(typeof $(this).context!="undefined"){textContainerImagesToConcat+=$(this).context.innerHTML}});return false}});$element.remove()});$this.setPageContent(textContainerToConcat);$this.setPageImages(textContainerImagesToConcat);var triggerLoadInterval=setInterval(function(){if(!$(".znpb-loading-wrapper-gif").is(":visible")){clearInterval(triggerLoadInterval);$this.trigger("seo.frontend.content_loaded");if($(".znpb-editor-header__first").length&&$("button.components-squirrly-icon").length){var $icon=$("button.components-squirrly-icon");$(".znpb-editor-header__first").append($icon);$icon.css("position","initial");$icon.css("margin-top","5px")}}},1e3)})})};$this.parseBricks=function(){SQ_DEBUG&&console.log("Start parsing "+$this.getBuilderName());builderSelectorsSettings={preview:["#bricks-builder-iframe"],title:["h1.entry-title","h1.brxe-post-title"],header:["h2","h3","h4","h5","h6"],container:[".brx-body"],containerWidget:".brx-container.root",containerWidgetImages:[".brxe-image"],saveAction:"bricks_save_post"};$.each(builderSelectorsSettings.container,function(index,container){$this.waitForElementToDisplay(container,$builderContents,$.sq_config.delay_seo,function(){var $container=$($builderContents).find(container);var $elementorWidgets=$container.find(builderSelectorsSettings.containerWidget);$currentNumberOfNodes=$elementorWidgets.length;var textContainerToConcat="";var textContainerImagesToConcat="";$.each($elementorWidgets,function(){var $element=$(this).clone();$.each(builderSelectorsSettings.title,function(index,value){if($this.getPageTitle()===""&&$this.elementExists(value,$element)){$this.setPageTitle($element.find(value+":first").text())}});$.each(builderSelectorsSettings.header,function(index,value){if($this.getPageHeadline()===""&&$this.elementExists(value,$element)){$this.setPageHeadline($element.find(value+":first").text())}});$.each(builderSelectorsSettings.header,function(index,value){if($this.elementExists(value,$element)){$this.setPageHeadline($element.find(value+":first").text())}});if($.isFunction($element.html)){textContainerToConcat+=$element.html()}else if(typeof $element.context!="undefined"){textContainerToConcat+=$element.context.innerHTML}$.each(builderSelectorsSettings.containerWidgetImages,function(index,value){var $imagesContainers=$element.find(value);if($imagesContainers.length>0){$.each($imagesContainers,function(){if($.isFunction($(this).html)){textContainerImagesToConcat+=$(this).html()}else if(typeof $(this).context!="undefined"){textContainerImagesToConcat+=$(this).context.innerHTML}});return false}});$element.remove()});$this.setPageContent(textContainerToConcat);$this.setPageImages(textContainerImagesToConcat);var triggerLoadInterval=setInterval(function(){if(!$(".et-fb-page-preloading").is(":visible")){clearInterval(triggerLoadInterval);$this.trigger("seo.frontend.content_loaded");if($("#bricks-toolbar").length&&$("button.components-squirrly-icon").length){var $icon=$("button.components-squirrly-icon");$("#bricks-toolbar .group-wrapper.left").append($icon);$icon.css("position","initial");$icon.css("margin-left","2px")}}},1e3)})})};$this.setBuilderExists=function(builderName){builderExists=true;builderInUse=builderName};$this.getBuilderExists=function(){return builderExists};$this.getBuilderName=function(){return builderInUse};$this.getBuilderContainer=function(){if($(builderSelectorsSettings.preview[0]).contents().find(builderSelectorsSettings.container[0]).length>0){return $(builderSelectorsSettings.preview[0]).contents().find(builderSelectorsSettings.container[0]).first()}if(builderSelectorsSettings.preview.length>0){return $(builderSelectorsSettings.preview[0]).contents().find("body")}return false};$this.getPageData=function(){return pageData};$this.getPageURL=function(){return pageData.url};$this.getPageTitle=function(){return pageData.title};$this.getMultipleH1=function(){return pageData.hasMultipleH1};$this.getH1=function(){return pageData.h1};$this.getPageContent=function(){return pageData.content};$this.getPageImages=function(){return pageData.images};$this.getPageHeadline=function(){return pageData.headline};$this.setPageURL=function(url){pageData.url=url};$this.setPageTitle=function(title){pageData.title=title};$this.setH1=function(h1Text){pageData.h1=h1Text};$this.setPageHeadline=function(headline){pageData.headline=headline};$this.setMultipleH1=function(flag){pageData.hasMultipleH1=flag};$this.setPageContent=function(content){pageData.content=content};$this.setPageImages=function(images){pageData.images=images};$this.triggerPageHasChanges=function(){SQ_DEBUG&&console.log("triggerPageHasChanges");$this.trigger("seo.frontend.refresh");$this.trigger("seo.frontend.new_changes")};$this.triggerButtonSaveClicked=function(){SQ_DEBUG&&console.log("triggerButtonSaveClicked");$this.trigger("seo.frontend.refresh");$this.trigger("seo.frontend.page_saved")};$this.on("seo.frontend.refresh",function(){$this.parseBuilders()});$(document).on("click","button",function(){if("#"+$(this).attr("id")===builderSelectorsSettings.saveButton){$this.triggerButtonSaveClicked()}if(typeof builderSelectorsSettings.saveButton!="undefined"){if(builderSelectorsSettings.saveButton.indexOf("#")===-1){if($(this).hasClass(builderSelectorsSettings.saveButton)){$this.triggerButtonSaveClicked()}}}});$(document).on("click","div",function(){if("#"+$(this).attr("id")===builderSelectorsSettings.draftButton){$this.triggerButtonSaveClicked()}if(typeof builderSelectorsSettings.saveButton!="undefined"){if(builderSelectorsSettings.saveButton.indexOf("#")===-1){if($(this).hasClass(builderSelectorsSettings.saveButton)){$this.triggerButtonSaveClicked()}}}if(typeof builderSelectorsSettings.draftButton!="undefined"){if(builderSelectorsSettings.draftButton.indexOf("#")===-1){if($(this).hasClass(builderSelectorsSettings.draftButton)){$this.triggerButtonSaveClicked()}}}});$(document).ajaxSend(function(event,jqxhr,settings){if(typeof settings.data!=="undefined"){if(typeof builderSelectorsSettings.saveAction!="undefined"&&$.isFunction(settings.data.indexOf)){if(settings.data.indexOf(builderSelectorsSettings.saveAction)!==-1){$this.triggerButtonSaveClicked()}}}});setInterval(function(){$this.trigger("seo.frontend.refresh");SQ_DEBUG&&console.log("Check Blocks number: "+$lastNumberOfNodes+" = "+$currentNumberOfNodes);if($lastNumberOfNodes!==$currentNumberOfNodes){$lastNumberOfNodes=$currentNumberOfNodes;$this.triggerPageHasChanges()}},3e4);$.sq_blockseo.on("seo.task_loaded",function(){$(".sq_tasks").find("#sq_alt").remove()});$this.init();window.sq_editor=$this;$this.trigger("seo.frontend.editor_loaded");return $this}})(jQuery);
view/assets/js/assistant/squirrly.min.js CHANGED
@@ -1 +1 @@
1
- if(typeof SQ_DEBUG==="undefined"){var SQ_DEBUG=false}(function($){"use strict";if($.isFunction($.fn.sq_main)||typeof $.sq_config==="undefined"){return}$.sq_initialized=false;$.sq_setConfig=function(){$.sq_config=$.extend({div:$("#postsquirrly"),editor:false,editor_type:false,active_editor:false,token:"",url_token:"",sq_apiurl:"//api.squirrly.co/v2/",ajaxurl:"",sq_nonce:"",sq_version:"",is_gutenberg:0,referer:"",keyword:"",lsi:[],language:"en-US",subscription_active:1,subscription_paid:0,sq_keywordtag:"",postID:0,prevNonce:"",user_url:"http://"+document.domain,research_language:"us",timeout_seo:null,timeout_search:null,timeout_research:null,sq_windowerror:false,interval_seo:null,calltimeout:5e3,delay_seo:3e4,cookie_expires:60*24*2,nrb:8,after_insert:'<div><br style="clear:both" /></div>',firsttime:false,manual:false,silent:false,briefcase:false,sq_cache:[]},$.sq_config)};$.sq_setParams=function(){$.sq_params=$.extend({low_density:1,high_density:2.5,high_density_title:35,low_density_title:2.5,min_length_title:10,max_length_title:75,min_length_body:80,max_length_body:0,min_length_description:20,max_length_description:160,begin_last_max_chars:400,max_word_density:3,beginning_length:255,ending_length:255,min_words_between_keywords:70,min_chars_between_keywords:200,max_keywords:5},$.sq_params)};$.sq_setfields=function(){$.sq_fields=$.extend({wp_title:$("#titlediv"),wp_input_title:$("#post").find("#title"),wp_postimagediv:$("#postimagediv"),wp_content_wrap:$(".wp-editor-wrap"),wp_content:$(".wp-editor-area"),wp_publish:$("#publish"),wp_postarea:$(".postarea"),wp_thumbnail_alt:$("#attachment_alt"),wp_thumbnail:$(".wp_attachment_image"),content_html:$("#content-html"),content_tmce:$("#content-tmce"),content_html_wp3:$("#edButtonHTML"),content_tmce_wp3:$("#edButtonPreview"),sq_box:$.sq_config.div.find(".sq_box"),sq_preloading:$.sq_config.div.find("#sq_preloading"),sq_preloading_keyword:$.sq_config.div.find("#sq_preloading_keyword"),sq_errorloading:$.sq_config.div.find("#sq_errorloading"),div_blocksearch:$.sq_config.div.find("#sq_blocksearch"),div_blockseo:$.sq_config.div.find("#sq_blockseo"),div_blockbriefacse:$("#sq_briefcase"),div_blocksnippet:$("#sq_blocksnippet"),sq_blocktabs:$.sq_config.div.find("#sq_block_tabs"),sq_blocksteps:$.sq_config.div.find(".sq_block_steps"),sq_search:$.sq_config.div.find(".sq_search"),sq_search_img_filter:$.sq_config.div.find("#sq_search_img_filter"),sq_search_second:$.sq_config.div.find("#sq_search_second"),sq_keyword_second:$.sq_config.div.find("#sq_keyword_second"),sq_keyword_second_check:$.sq_config.div.find("#sq_keyword_second_check"),sq_briefcase_icon:$.sq_config.div.find("#sq_briefcase_icon"),sq_briefcase_list:$.sq_config.div.find("#sq_briefcase_list"),sq_research_link:$.sq_config.div.find("#sq_research_link"),sq_selectit:$.sq_config.div.find("#sq_selectit"),sq_types:$.sq_config.div.find("#sq_types"),sq_type_img:$.sq_config.div.find("#sq_type_img"),sq_type_twitter:$.sq_config.div.find("#sq_type_twitter"),sq_type_news:$.sq_config.div.find("#sq_type_news"),sq_type_blog:$.sq_config.div.find("#sq_type_blog"),sq_type_wiki:$.sq_config.div.find("#sq_type_wiki"),sq_type_local:$.sq_config.div.find("#sq_type_local"),sq_research:$("#sq_research"),sq_blog_preview:$('<div id="sq_blog_preview"><div id="sq_blog_preview_close" >x</div><div id="sq_blog_preview_title"></div><div id="sq_blog_preview_body"></div></div><div id="sq_blog_preview_overlay"></div>'),sq_search_img_nolicence:$("#sq_search_img_nolicence"),sq_keyword_div:$.sq_config.div.find(".sq_keyword"),sq_keyword:$.sq_config.div.find("#sq_keyword"),sq_keyword_score:$.sq_config.div.find("#sq_keyword_score"),sq_keyword_check:$.sq_config.div.find("#sq_keyword_check"),sq_keyword_nokeyword:$.sq_config.div.find("#sq_nokeyword"),sq_keywords_research:$("#sq_keywords_research"),sq_keywords_research_add:$(".sq_keywords_research_add"),sq_keywords_research_submit:$(".sq_keywords_research_submit"),sq_keywords_research_clear:$(".sq_keywords_research_clear"),sq_research_close:$("#sq_research_close")},$.sq_fields)};$.isDom=function(inp){return inp&&inp.tagName&&inp.nodeName&&inp.ownerDocument&&inp.removeAttribute};$.sq_isGutenberg=function(){if(typeof wp!=="undefined"&&typeof wp.data!=="undefined"&&typeof wp.data.select("core/editor")!=="undefined"&&typeof wp.blocks!=="undefined"){if(wp.data.select("core/editor")&&$.isFunction(wp.data.select("core/editor").getEditedPostAttribute)&&$(".block-editor").length>0){return true}}return false};$.sq_isDiviBuilder=function(){if($("#et_pb_layout:visible").length>0){return true}return false};$.sq_getBuilderEditorContainer=function(){if($.sq_isGutenberg()){if($(".block-editor-block-list__layout.is-root-container").length>0){return $(".block-editor-block-list__layout.is-root-container")}}else if($.sq_isFrontend()){if($.sq_editor.getFrontendEditor()&&$.sq_editor.getFrontendEditor().getBuilderContainer()){return $.sq_editor.getFrontendEditor().getBuilderContainer()}}else if($.sq_config.active_editor){return $.sq_config.active_editor}return $("<div></div>")};$.sq_isFrontend=function(){if(typeof $.sq_config.div==="undefined"){$.sq_initialize()}if($.sq_config.div.length>0&&$.sq_config.div.hasClass("sq_frontend")){return true}return false};$.sq_getDomain=function(url,ret,separator){var domainName="";if(typeof ret==="undefined"){var ret=[8,10]}if(typeof separator==="undefined"){var separator=""}url=url.split(/([a-z0-9_\-]{1,5}:\/\/)?(([a-z0-9_\-]{1,}):([a-z0-9_\-]{1,})\@)?((www\.)|([a-z0-9_\-]{1,}\.)+)?([a-z0-9_\-]{3,})((\.[a-z]{2,4})(:(\d{1,5}))?)(\/([a-z0-9_\-]{1,}\/)+)?([a-z0-9_\-]{1,})?(\.[a-z]{2,})?(\?)?(((\&)?[a-z0-9_\-]{1,}(\=[a-z0-9_\-]{1,})?)+)?/g);$.each(ret,function(key,val){if(typeof url[val]!=="undefined"){domainName=domainName+(domainName!==""?separator:"")+url[val]}});return domainName};if(!$.sq_showMessage)$.sq_showMessage=function(text,time){$(".sq_notice").hide();var $div=$('<div class="sq_notice sq_fixed" ><div>'+text+"</div></div>");$("body").prepend($div);if(typeof time==="undefined"){time=2e3}setTimeout(function(){$div.remove()},time);return $div.find("div")};if(!$.sq_getHashParam)$.sq_getHashParam=function(key){if(location.href.indexOf("#")!==-1&&location.href.indexOf("#"+key)!==-1&&window.location.href.split("#")[1]!==""){var results=new RegExp("[\\?&#]"+key+"=([^&#]*)").exec(window.location.href);if(results){return results[1]||0}else{var results=new RegExp("[\\?&#]"+key+"[^&#]*").exec(window.location.href);if(results){return"1"}}}return false};if(!$.sq_setHashParam)$.sq_setHashParam=function(key){var separator="";if(!$.sq_getHashParam(key)){if(location.href.indexOf("#")!==-1){if(location.href.split("#")[1]!=="")separator="&"}else{separator="#"}window.location.href=window.location.href+separator+key}return false};if(!$.sq_deleteHashParam)$.sq_deleteHashParam=function(key){if($.sq_getHashParam(key)){window.location.href=window.location.href.replace("&"+key,"")}if($.sq_getHashParam(key)){window.location.href=window.location.href.replace(key,"")}return false};$.sq_formatNumber=function(number){var x,x1,x2;number+="";x=number.split(".");x1=x[0];x2=x.length>1?"."+x[1]:"";var rgx=/(\d+)(\d{3})/;while(rgx.test(x1)){x1=x1.replace(rgx,"$1"+","+"$2")}return x1+x2};$.sq_clearText=function(str){if(typeof str!=="undefined"&&str.length>0){str=$.sq_clearDiacritics(str);str=$.sq_stripTags(str)}return str};$.sq_umlautsText=function(str){str=str.replace("ä","ae");str=str.replace("ö","oe");str=str.replace("ß","ss");str=str.replace("ü","ue");str=str.replace("æ","ae");str=str.replace("ø","oe");str=str.replace("å","aa");str=str.replace("é","e");str=str.replace("è","e");return str};$.sq_stripTags=function(str){if(typeof str!=="undefined"&&str.length>0){str=$("<div />").html(str).text()}return str};$.sq_stripShortcode=function(str){if(typeof str!=="undefined"&&str.length>0){str=str.replace(/\\[[^\\]]+\\]/g,"")}return str};$.sq_stripChars=function(str){if(typeof str!=="undefined"&&str.length>0){str=str.replace(/[-.\/]+/g," ");var pattern=$.sq_regex("[^\\p{L}\\d\\s]");if(pattern){str=str.replace(pattern,"")}str=str.replace(/\s{2,}/g," ");str=str.trim()}return str};$.sq_clearDiacritics=function(str){if(typeof sqDiacritics!=="undefined"&&typeof str=="string"){return sqDiacritics.clear(str)}return str};$.sq_getCookie=function(name){var nameEQ=name+"=";var ca=document.cookie.split(";");for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==" ")c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return decodeURIComponent(c.substring(nameEQ.length,c.length))}return null};$.sq_setCookie=function(name,value){value=value.replace(new RegExp("\\\\","g"),"");document.cookie=name+"="+encodeURIComponent(value)+"; expires="+$.sq_config.cookie_expires+"; path=/"};$.sq_uriEncode=function(url){return url.replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29")};$.sq_getCache=function(name){if(typeof $.sq_config.sq_cache!=="undefined")if(typeof $.sq_config.sq_cache[name]!=="undefined")return $.sq_config.sq_cache[name];return""};$.sq_setCache=function(name,value){if(typeof name!=="undefined"&&typeof $.sq_config.sq_cache!=="undefined"){$.sq_config.sq_cache[name]=value}};$.sq_strEqual=function(a,b){return typeof a==="string"&&typeof b==="string"?a.localeCompare(b,undefined,{sensitivity:"accent"})===0:a===b};$.sq_isArray=function(input){return typeof input==="object"&&input instanceof Array};$.sq_regex=function(striptag){if(typeof XRegExp!=="undefined"){return XRegExp(striptag,"gi")}return false};$.fn.sq_loading=function(name){var $this=this;if(typeof name==="undefined"){$this.sq_classname="sq_minloading"}else{$this.sq_classname=name}clearTimeout($.sq_loadprocess);$this.addClass($this.sq_classname);$this.frame=function(){$this.html('<span class="sq_error_message">'+$.sq_config.__ajaxerror+"</span>");$this.addClass("sq_error");$this.sq_doneloading()};$.sq_loadprocess=setTimeout($this.frame,1e4);return $this};$.fn.sq_doneloading=function(name){var $this=this;if(typeof name==="undefined"){name="sq_minloading"}clearTimeout($.sq_loadprocess);$this.removeClass(name);$this.find(".sq_error_message").remove();return $this};$.sq_checkin=function(){return $.post($.sq_config.ajaxurl,{action:"sla_checkin",sq_nonce:$.sq_config.sq_nonce,output:"json"}).done(function(response){$.sq_fields.sq_box.show();$.sq_fields.sq_preloading.hide();$.sq_fields.sq_preloading_keyword.show();if(typeof response.error!=="undefined"){if(response.error==="invalid_token"){if($.isFunction($.sq_config.div.sq_floating)){$.sq_floating=$.sq_config.div.sq_floating([]);$.sq_floating.init()}var $message=$('<div class="sq_error_message" style="width: 100%;text-align: center;padding: 10px;"><a href="admin.php?page=sq_dashboard" style="color: #df3434;font-size: 13px;font-weight: 500;">'+$.sq_config.__noconnection+"</a></div>");var sq_header=$.sq_fields.sq_box.find(".sq_header");$.sq_fields.sq_box.html($message);$.sq_fields.sq_box.prepend(sq_header);$.sq_fields.sq_box.find(".sq_box_maximize").hide();$.sq_fields.sq_box.find(".sq_box_close").on("click",function(){$.sq_config.div.hide();$.sq_setCookie("sq_sla","off")});$.sq_config.div.show();setTimeout(function(){$.sq_config.div.hide()},5e3)}else if(response.error==="maintenance"){if($.isFunction($.sq_config.div.sq_floating)){$.sq_floating=$.sq_config.div.sq_floating([]);$.sq_floating.init()}var $message=$('<div class="sq_error_message" style="width: 100%;text-align: center;padding: 10px;font-size: 12px;">'+$.sq_config.__maintenance+"</div>");var sq_header=$.sq_fields.sq_box.find(".sq_header");$.sq_fields.sq_box.html($message);$.sq_fields.sq_box.prepend(sq_header);$.sq_fields.sq_box.find(".sq_box_maximize").hide();$.sq_fields.sq_box.find(".sq_box_close").on("click",function(){$.sq_config.div.hide();$.sq_setCookie("sq_sla","off")});$.sq_config.div.show();setTimeout(function(){$.sq_config.div.hide()},5e3)}}if(typeof response.data!=="undefined"){var triggerLoadInterval=setInterval(function(){if($.sq_triggerLoad("seo.loaded")){clearInterval(triggerLoadInterval)}},1e3)}}).fail(function(){$.sq_fields.sq_box.show();$.sq_fields.sq_preloading.hide();$.sq_fields.sq_errorloading.show()})};$.sq_triggerLoad=function(message){if(typeof $.sq_config.div==="undefined"){$.sq_initialize()}if(typeof $.sq_blockbriefcase!=="undefined"&&typeof $.sq_blockseo!=="undefined"&&typeof $.sq_blocksearch!=="undefined"){$.sq_blockbriefcase.trigger(message);$.sq_blockseo.trigger(message);$.sq_blocksearch.trigger(message);$.sq_config.div.trigger(message);return true}else{return false}};$.sq_savePost=function(){var $sq_seo=[];$.sq_config.div.find('input[name="sq_seo[]"]').each(function(){$sq_seo.push(this.value)});if($.sq_blockbriefcase){$.sq_blockbriefcase.trigger("briefcase.save")}$.post($.sq_config.ajaxurl,{action:"sq_ajax_save_post",sq_nonce:$.sq_config.sq_nonce,post_id:$.sq_config.postID,sq_keyword:$.sq_config.keyword,referer:"backend",sq_seo:$sq_seo})};$.sq_editor={getIframeEditor:function(element){var $this=$("#wpcontent");if(typeof element==="undefined"){element="#tinymce"}if($.sq_isGutenberg()){if($this.find("#editor").find("div.edit-post-visual-editor").length>0){return $this.find("#editor").find("div.edit-post-visual-editor")}if($this.find("#editor").find("div.edit-post-text-editor__body").length>0){return $this.find("#editor").find("div.edit-post-text-editor__body")}}if($this.find("#post").length>0&&$this.find("#post").find("iframe").length>0){if($this.find(".mce-container").find("iframe").contents().find(element+".has-focus").length>0){return $(".mce-container").find("iframe").contents().find(element+".has-focus")}if($this.find(".mce-container").find("iframe").contents().find(element).length>0){return $this.find(".mce-container").find("iframe").contents().find(element)}if($this.find("#content_ifr").contents().find(element).length>0){return $this.find("#content_ifr").contents().find(element)}if($this.find(".cke_contents").find("iframe").contents().find("body").length>0){return $this.find(".cke_contents").find("iframe").contents().find("body")}if($this.find("#cke_wysiwyg_frame").contents().find("body").length>0){return $this.find("#cke_wysiwyg_frame").contents().find("body")}}return false},getTinymceEditor:function(ed){var editor;if(typeof ed!=="undefined"&&typeof ed==="object"){editor=ed;if(typeof editor.activeEditor==="object")editor=editor.activeEditor}else{if(typeof tinyMCE==="object"){editor=tinyMCE;if(typeof tinyMCE.get("content")!=="undefined"){editor=tinyMCE.get("content")}else{if(typeof tinyMCE.activeEditor==="object"&&tinyMCE.activeEditor!==null){editor=tinyMCE.activeEditor}else{if(document.getElementById("content")!==null){editor=new tinymce.Editor("content");editor.contentCSS=["/wp-content/plugins/squirrly-seo/themes/default/css/sq_frontend.css"]}}}}}return editor},getBlockEditor:function(action){if($.sq_isGutenberg()){if(action==="select"){var ed=window.wp.data.select("core/editor")}else{var ed=window.wp.data.dispatch("core/editor")}return ed}return false},getFrontendEditor:function(action){if($.sq_isFrontend()){if(typeof window.sq_editor!=="undefined"){return window.sq_editor}}return false},createEditorButton:function(name){if($.sq_isFrontend()&&$("."+name).length==0){$("body").append('<button type="button" class="'+name+'"><i class="sq_logo" ></i></button>')}else if($.sq_isGutenberg()){if($(".edit-post-more-menu").length>0){$(".edit-post-more-menu").before('<button type="button" class="sq-position-static '+name+'"><i class="sq_logo" ></i></button>')}else if($(".interface-pinned-items").length>0){$(".interface-pinned-items").after('<button type="button" class="sq-ml-2 sq-position-static '+name+'"><i class="sq_logo" ></i></button>')}else if($(".edit-post-header__settings").length>0){$(".edit-post-header__settings").append('<button type="button" class="sq-position-static '+name+'"><i class="sq_logo" ></i></button>')}}else{$("body").append('<button type="button" class="'+name+'"><i class="sq_logo" ></i></button>')}},listenHtml:function(e){if(e.originalEvent.dataTransfer===null)return;var img=e.originalEvent.dataTransfer.getData("text");if($("#"+$(img).attr("id")).parent("li").attr("class")==="sq_search_img_li"){$.sq_fields.wp_content.val($.sq_fields.wp_content.val()+$.sq_blocksearch.packimg($(img).attr("id"),$("#"+$(img).attr("id")).parent("li").attr("src"),$("#"+$(img).attr("id")).parent("li")))}},listen:function(e){if($("#"+e.target.id).parent("li").attr("class")==="sq_search_img_li"){if($.sq_editor.lastimage!==$("#"+e.target.id).parent("li").attr("src")){$.sq_editor.insert($.sq_blocksearch.packimg(e.target.id,$("#"+e.target.id).parent("li").attr("src"),$("#"+e.target.id).parent("li")))}}$.sq_editor.lastimage=$("#"+e.target.id).parent("li").attr("src")},setContent:function(content,ed){if($.sq_config.editor_type==="tinymce"){var editor=$.sq_editor.getTinymceEditor(ed);if(typeof editor!=="undefined"){editor.setContent(content)}}},insert:function(content,ed){if($.sq_isDiviBuilder()||$.sq_isFrontend()){var input=document.createElement("textarea");document.body.prepend(input);input.value=content;input.focus();input.select();try{document.execCommand("copy");alert("We've copied the code and you can paste it in the Page Builder.")}catch(e){alert("You can copy the box and paste it in the Page Builder")}input.remove();if($(".edit-post-layout__content").length>0){$(".edit-post-layout__content").animate({scrollTop:$(".edit-post-layout__content").scrollTop()+$("#et_pb_layout").offset().top-50},"slow")}else{$("html,body").animate({scrollTop:$("#et_pb_layout").offset().top-50},"slow")}}else if($("#wpb_visual_composer:visible").length>0){var input=document.createElement("textarea");document.body.prepend(input);input.value=content;input.focus();input.select();try{document.execCommand("copy");alert("Visual Composer detected. We've copied the code and you can paste it in Visual Composer Editor.")}catch(e){alert("Visual Composer detected. You can copy the box and paste it in Visual Composer")}input.remove();if($(".edit-post-layout__content").length>0){$(".edit-post-layout__content").animate({scrollTop:$(".edit-post-layout__content").scrollTop()+$("#wpb_visual_composer").offset().top-50},"slow")}else{$("html,body").animate({scrollTop:$("#wpb_visual_composer").offset().top-50},"slow")}}else if($("#elementor-switch-mode-input").length>0&&$("#elementor-switch-mode-input").val()=="builder"){var input=document.createElement("textarea");document.body.appendChild(input);input.value=content;input.focus();input.select();try{document.execCommand("copy");alert("Elementor is detected. We've copied the code and you can paste it in Elementor Text Editor.")}catch(e){alert("Elementor detected. You can copy the box and paste it in Elementor Text Editor")}input.remove()}else if($("div.wp-editor-container").find("div.cs-editor-container.pro").length>0){var input=document.createElement("textarea");document.body.appendChild(input);input.value=content;input.focus();input.select();try{document.execCommand("copy");alert("Themeco PRO is detected. We've copied the code and you can paste it in Themeco PRO Text Editor.")}catch(e){alert("Themeco PRO detected. You can copy the box and paste it in Themeco PRO Text Editor")}input.remove()}else if($.sq_config.editor_type==="tinymce"){if(typeof tinyMCE==="object"){var editor=tinyMCE;if(typeof editor.activeEditor==="object"){editor=editor.activeEditor}}if(typeof editor!=="undefined"&&editor!==null){if(typeof editor.selection!=="undefined"){editor.selection.setContent(content)}else{editor.setContent(content)}$.sq_blockseo.callback()}}else{$.sq_fields.wp_content.val($.sq_fields.wp_content.val().substr(0,$.sq_fields.wp_content[0].selectionStart)+content+$.sq_fields.wp_content.val().substr($.sq_fields.wp_content[0].selectionEnd));$.sq_blockseo.callback()}}};$.sq_tinymce={callback:function(ed){if(ed.id!=="content")return false;var editor=$.sq_editor.getTinymceEditor(ed);if(typeof editor!=="undefined"&&typeof $.sq_blockseo==="object"){if($.sq_config.editor_type==="tinymce"){$.sq_blockseo.callback()}}},setup:function(ed){},addEvents:function(ed,dom){if(typeof $.sq_blockseo!=="undefined"&&typeof $.sq_editor==="object"&&!$.isDom($.sq_editor)){if($.sq_config.active_editor=$.sq_editor.getIframeEditor()){$.sq_blockseo.callback()}}}};$.fn.sq_main=function(){var $this=this;$this.load=function(){$.sq_setfields();$.sq_setParams();$.sq_initialized=true;$.sq_loadtabs();$.sq_highlight=function(element,text,params){var options=$.extend({element:"mark","acrossElements ":1,ignoreJoiners:1,diacritics:false,separateWordSearch:false,caseSensitive:false,accuracy:{value:"exactly",limiters:["`","~","!","@","#","$","%","^","&","*","(",")","-","_","=","+","{","}","[","]","\\","|",":",";","'",'"',",",".","<",">","/","?","“","”"]},ignorePunctuation:[" ",",","`","~","!","@","#","$","%","^","*","(",")","-","_","=","+","{","}","[","]","\\","|",":",";","'",'"',"<",">","/","?"],counter:1},params);if(typeof element!=="undefined"&&element.html()!==""&&$.isFunction(element.sq_unmark)){if(typeof options.range!=="undefined"){element.sq_unmark({done:function(){element.sq_markRanges(options.range,options)}})}else{element.sq_unmark({done:function(){element.sq_mark(text,options)}})}}};$.sq_removeHighlight=function(element){if(typeof element!=="undefined"&&$.isFunction(element.sq_unmark)&&!$.sq_isDiviBuilder()){element.sq_unmark()}};if($.isFunction($.sq_fields.sq_briefcase_list.sq_briefcase)){$.sq_blockbriefcase=$.sq_fields.sq_briefcase_list.sq_briefcase([])}if($.isFunction($.sq_config.div.sq_frontend)){$.sq_frontend=$.sq_config.div.sq_frontend([]);$.sq_frontend.init()}if($.sq_fields.div_blockseo.length>0&&$.isFunction($.sq_fields.div_blockseo.sq_blockseo)){$.sq_blockseo=$.sq_fields.div_blockseo.sq_blockseo([])}if($.sq_fields.div_blocksearch.length>0&&$.isFunction($.sq_fields.div_blocksearch.sq_blocksearch)){$.sq_blocksearch=$.sq_fields.div_blocksearch.sq_blocksearch([])}if($.isFunction($.sq_config.div.sq_floating)){$.sq_floating=$.sq_config.div.sq_floating([]);if(!$.sq_frontend){$.sq_floating.init()}}$.sq_checkin()};return $this};$.sq_loadtabs=function(){$.sq_fields.sq_blocktabs.find("div").on("click",function(){$.sq_fields.sq_selectit.trigger("click");$.sq_fields.sq_blocktabs.find("div").removeClass("sq_active");$(this).addClass("sq_active");$(".sq_block_steps").hide();$($(this).data("target")).show()});$.sq_fields.sq_blocksteps.find(".sq_nextstep").on("click",function(){$('.sq_block_tab[data-target="'+$(this).data("target")+'"]').trigger("click")})};$.sq_initialize=function(){$.sq_setConfig();if(typeof $.sq_config.div!=="undefined"&&!$.sq_initialized&&$.sq_config.div.length>0){$.sq_config.div.sq_main().load()}};$(document).ready(function(){$.sq_initialize()});window.onerror=function(){if(typeof $.sq_config.div==="undefined"){$.sq_initialize()}};$(document).ajaxSuccess(function(event){if(typeof $.sq_config.div==="undefined"){$.sq_initialize()}})})(jQuery);
1
+ if(typeof SQ_DEBUG==="undefined"){var SQ_DEBUG=false}(function($){"use strict";if($.isFunction($.fn.sq_main)||typeof $.sq_config==="undefined"){return}$.sq_initialized=false;$.sq_setConfig=function(){$.sq_config=$.extend({div:$("#postsquirrly"),editor:false,editor_type:false,active_editor:false,token:"",url_token:"",sq_apiurl:"//api.squirrly.co/v2/",ajaxurl:"",sq_nonce:"",sq_version:"",is_gutenberg:0,referer:"",keyword:"",lsi:[],language:"en-US",subscription_active:1,subscription_paid:0,sq_keywordtag:"",postID:0,prevNonce:"",user_url:"http://"+document.domain,research_language:"us",timeout_seo:null,timeout_search:null,timeout_research:null,sq_windowerror:false,interval_seo:null,calltimeout:5e3,delay_seo:3e4,cookie_expires:60*24*2,nrb:8,after_insert:'<div><br style="clear:both" /></div>',firsttime:false,manual:false,silent:false,briefcase:false,sq_cache:[]},$.sq_config)};$.sq_setParams=function(){$.sq_params=$.extend({low_density:1,high_density:2.5,high_density_title:35,low_density_title:2.5,min_length_title:10,max_length_title:75,min_length_body:80,max_length_body:0,min_length_description:20,max_length_description:160,begin_last_max_chars:400,max_word_density:3,beginning_length:255,ending_length:255,min_words_between_keywords:70,min_chars_between_keywords:200,max_keywords:5},$.sq_params)};$.sq_setfields=function(){$.sq_fields=$.extend({wp_title:$("#titlediv"),wp_input_title:$("#post").find("#title"),wp_postimagediv:$("#postimagediv"),wp_content_wrap:$(".wp-editor-wrap"),wp_content:$(".wp-editor-area"),wp_publish:$("#publish"),wp_postarea:$(".postarea"),wp_thumbnail_alt:$("#attachment_alt"),wp_thumbnail:$(".wp_attachment_image"),content_html:$("#content-html"),content_tmce:$("#content-tmce"),content_html_wp3:$("#edButtonHTML"),content_tmce_wp3:$("#edButtonPreview"),sq_box:$.sq_config.div.find(".sq_box"),sq_preloading:$.sq_config.div.find("#sq_preloading"),sq_preloading_keyword:$.sq_config.div.find("#sq_preloading_keyword"),sq_errorloading:$.sq_config.div.find("#sq_errorloading"),div_blocksearch:$.sq_config.div.find("#sq_blocksearch"),div_blockseo:$.sq_config.div.find("#sq_blockseo"),div_blockbriefacse:$("#sq_briefcase"),div_blocksnippet:$("#sq_blocksnippet"),sq_blocktabs:$.sq_config.div.find("#sq_block_tabs"),sq_blocksteps:$.sq_config.div.find(".sq_block_steps"),sq_search:$.sq_config.div.find(".sq_search"),sq_search_img_filter:$.sq_config.div.find("#sq_search_img_filter"),sq_search_second:$.sq_config.div.find("#sq_search_second"),sq_keyword_second:$.sq_config.div.find("#sq_keyword_second"),sq_keyword_second_check:$.sq_config.div.find("#sq_keyword_second_check"),sq_briefcase_icon:$.sq_config.div.find("#sq_briefcase_icon"),sq_briefcase_list:$.sq_config.div.find("#sq_briefcase_list"),sq_research_link:$.sq_config.div.find("#sq_research_link"),sq_selectit:$.sq_config.div.find("#sq_selectit"),sq_types:$.sq_config.div.find("#sq_types"),sq_type_img:$.sq_config.div.find("#sq_type_img"),sq_type_twitter:$.sq_config.div.find("#sq_type_twitter"),sq_type_news:$.sq_config.div.find("#sq_type_news"),sq_type_blog:$.sq_config.div.find("#sq_type_blog"),sq_type_wiki:$.sq_config.div.find("#sq_type_wiki"),sq_type_local:$.sq_config.div.find("#sq_type_local"),sq_research:$("#sq_research"),sq_blog_preview:$('<div id="sq_blog_preview"><div id="sq_blog_preview_close" >x</div><div id="sq_blog_preview_title"></div><div id="sq_blog_preview_body"></div></div><div id="sq_blog_preview_overlay"></div>'),sq_search_img_nolicence:$("#sq_search_img_nolicence"),sq_keyword_div:$.sq_config.div.find(".sq_keyword"),sq_keyword:$.sq_config.div.find("#sq_keyword"),sq_keyword_score:$.sq_config.div.find("#sq_keyword_score"),sq_keyword_check:$.sq_config.div.find("#sq_keyword_check"),sq_keyword_nokeyword:$.sq_config.div.find("#sq_nokeyword"),sq_keywords_research:$("#sq_keywords_research"),sq_keywords_research_add:$(".sq_keywords_research_add"),sq_keywords_research_submit:$(".sq_keywords_research_submit"),sq_keywords_research_clear:$(".sq_keywords_research_clear"),sq_research_close:$("#sq_research_close")},$.sq_fields)};$.isDom=function(inp){return inp&&inp.tagName&&inp.nodeName&&inp.ownerDocument&&inp.removeAttribute};$.sq_isGutenberg=function(){if(typeof wp!=="undefined"&&typeof wp.data!=="undefined"&&typeof wp.data.select("core/editor")!=="undefined"&&typeof wp.blocks!=="undefined"){if(wp.data.select("core/editor")&&$.isFunction(wp.data.select("core/editor").getEditedPostAttribute)&&$(".block-editor").length>0){return true}}return false};$.sq_isDiviBuilder=function(){if($("#et_pb_layout:visible").length>0){return true}return false};$.sq_getBuilderEditorContainer=function(){if($.sq_isGutenberg()){if($(".block-editor-block-list__layout.is-root-container").length>0){return $(".block-editor-block-list__layout.is-root-container")}}else if($.sq_isFrontend()){if($.sq_editor.getFrontendEditor()&&$.sq_editor.getFrontendEditor().getBuilderContainer()){return $.sq_editor.getFrontendEditor().getBuilderContainer()}}else if($.sq_config.active_editor){return $.sq_config.active_editor}return $("<div></div>")};$.sq_isFrontend=function(){if(typeof $.sq_config.div==="undefined"){$.sq_initialize()}if($.sq_config.div.length>0&&$.sq_config.div.hasClass("sq_frontend")){return true}return false};$.sq_getDomain=function(url,ret,separator){var domainName="";if(typeof ret==="undefined"){var ret=[8,10]}if(typeof separator==="undefined"){var separator=""}url=url.split(/([a-z0-9_\-]{1,5}:\/\/)?(([a-z0-9_\-]{1,}):([a-z0-9_\-]{1,})\@)?((www\.)|([a-z0-9_\-]{1,}\.)+)?([a-z0-9_\-]{3,})((\.[a-z]{2,4})(:(\d{1,5}))?)(\/([a-z0-9_\-]{1,}\/)+)?([a-z0-9_\-]{1,})?(\.[a-z]{2,})?(\?)?(((\&)?[a-z0-9_\-]{1,}(\=[a-z0-9_\-]{1,})?)+)?/g);$.each(ret,function(key,val){if(typeof url[val]!=="undefined"){domainName=domainName+(domainName!==""?separator:"")+url[val]}});return domainName};if(!$.sq_showMessage)$.sq_showMessage=function(text,time){$(".sq_notice").hide();var $div=$('<div class="sq_notice sq_fixed" ><div>'+text+"</div></div>");$("body").prepend($div);if(typeof time==="undefined"){time=2e3}setTimeout(function(){$div.remove()},time);return $div.find("div")};if(!$.sq_getHashParam)$.sq_getHashParam=function(key){if(location.href.indexOf("#")!==-1&&location.href.indexOf("#"+key)!==-1&&window.location.href.split("#")[1]!==""){var results=new RegExp("[\\?&#]"+key+"=([^&#]*)").exec(window.location.href);if(results){return results[1]||0}else{var results=new RegExp("[\\?&#]"+key+"[^&#]*").exec(window.location.href);if(results){return"1"}}}return false};if(!$.sq_setHashParam)$.sq_setHashParam=function(key){var separator="";if(!$.sq_getHashParam(key)){if(location.href.indexOf("#")!==-1){if(location.href.split("#")[1]!=="")separator="&"}else{separator="#"}window.location.href=window.location.href+separator+key}return false};if(!$.sq_deleteHashParam)$.sq_deleteHashParam=function(key){if($.sq_getHashParam(key)){window.location.href=window.location.href.replace("&"+key,"")}if($.sq_getHashParam(key)){window.location.href=window.location.href.replace(key,"")}return false};$.sq_formatNumber=function(number){var x,x1,x2;number+="";x=number.split(".");x1=x[0];x2=x.length>1?"."+x[1]:"";var rgx=/(\d+)(\d{3})/;while(rgx.test(x1)){x1=x1.replace(rgx,"$1"+","+"$2")}return x1+x2};$.sq_clearText=function(str){if(typeof str!=="undefined"&&str.length>0){str=$.sq_clearDiacritics(str);str=$.sq_stripTags(str)}return str};$.sq_umlautsText=function(str){str=str.replace("ä","ae");str=str.replace("ö","oe");str=str.replace("ß","ss");str=str.replace("ü","ue");str=str.replace("æ","ae");str=str.replace("ø","oe");str=str.replace("å","aa");str=str.replace("é","e");str=str.replace("è","e");return str};$.sq_stripTags=function(str){if(typeof str!=="undefined"&&str.length>0){str=$("<div />").html(str).text()}return str};$.sq_stripShortcode=function(str){if(typeof str!=="undefined"&&str.length>0){str=str.replace(/\\[[^\\]]+\\]/g,"")}return str};$.sq_stripChars=function(str){if(typeof str!=="undefined"&&str.length>0){str=str.replace(/[-.\/]+/g," ");var pattern=$.sq_regex("[^\\p{L}\\d\\s]");if(pattern){str=str.replace(pattern,"")}str=str.replace(/\s{2,}/g," ");str=str.trim()}return str};$.sq_clearDiacritics=function(str){if(typeof sqDiacritics!=="undefined"&&typeof str=="string"){return sqDiacritics.clear(str)}return str};$.sq_getCookie=function(name){var nameEQ=name+"=";var ca=document.cookie.split(";");for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==" ")c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return decodeURIComponent(c.substring(nameEQ.length,c.length))}return null};$.sq_setCookie=function(name,value){value=value.replace(new RegExp("\\\\","g"),"");document.cookie=name+"="+encodeURIComponent(value)+"; expires="+$.sq_config.cookie_expires+"; path=/"};$.sq_uriEncode=function(url){return url.replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29")};$.sq_getCache=function(name){if(typeof $.sq_config.sq_cache!=="undefined")if(typeof $.sq_config.sq_cache[name]!=="undefined")return $.sq_config.sq_cache[name];return""};$.sq_setCache=function(name,value){if(typeof name!=="undefined"&&typeof $.sq_config.sq_cache!=="undefined"){$.sq_config.sq_cache[name]=value}};$.sq_strEqual=function(a,b){return typeof a==="string"&&typeof b==="string"?a.localeCompare(b,undefined,{sensitivity:"accent"})===0:a===b};$.sq_isArray=function(input){return typeof input==="object"&&input instanceof Array};$.sq_regex=function(striptag){if(typeof XRegExp!=="undefined"){return XRegExp(striptag,"gi")}return false};$.fn.sq_loading=function(name){var $this=this;if(typeof name==="undefined"){$this.sq_classname="sq_minloading"}else{$this.sq_classname=name}clearTimeout($.sq_loadprocess);$this.addClass($this.sq_classname);return $this};$.fn.sq_doneloading=function(name){var $this=this;if(typeof name==="undefined"){name="sq_minloading"}clearTimeout($.sq_loadprocess);$this.removeClass(name);$this.find(".sq_error_message").remove();return $this};$.sq_checkin=function(){return $.post($.sq_config.ajaxurl,{action:"sla_checkin",sq_nonce:$.sq_config.sq_nonce,output:"json"}).done(function(response){$.sq_fields.sq_box.show();$.sq_fields.sq_preloading.hide();$.sq_fields.sq_preloading_keyword.show();if(typeof response.error!=="undefined"){if(response.error==="invalid_token"){if($.isFunction($.sq_config.div.sq_floating)){$.sq_floating=$.sq_config.div.sq_floating([]);$.sq_floating.init()}var $message=$('<div class="sq_error_message" style="width: 100%;text-align: center;padding: 10px;"><a href="admin.php?page=sq_dashboard" style="color: #df3434;font-size: 13px;font-weight: 500;">'+$.sq_config.__noconnection+"</a></div>");var sq_header=$.sq_fields.sq_box.find(".sq_header");$.sq_fields.sq_box.html($message);$.sq_fields.sq_box.prepend(sq_header);$.sq_fields.sq_box.find(".sq_box_maximize").hide();$.sq_fields.sq_box.find(".sq_box_close").on("click",function(){$.sq_config.div.hide();$.sq_setCookie("sq_sla","off")});$.sq_config.div.show();setTimeout(function(){$.sq_config.div.hide()},5e3)}else if(response.error==="maintenance"){if($.isFunction($.sq_config.div.sq_floating)){$.sq_floating=$.sq_config.div.sq_floating([]);$.sq_floating.init()}var $message=$('<div class="sq_error_message" style="width: 100%;text-align: center;padding: 10px;font-size: 12px;">'+$.sq_config.__maintenance+"</div>");var sq_header=$.sq_fields.sq_box.find(".sq_header");$.sq_fields.sq_box.html($message);$.sq_fields.sq_box.prepend(sq_header);$.sq_fields.sq_box.find(".sq_box_maximize").hide();$.sq_fields.sq_box.find(".sq_box_close").on("click",function(){$.sq_config.div.hide();$.sq_setCookie("sq_sla","off")});$.sq_config.div.show();setTimeout(function(){$.sq_config.div.hide()},5e3)}}if(typeof response.data!=="undefined"){var triggerLoadInterval=setInterval(function(){if($.sq_triggerLoad("seo.loaded")){clearInterval(triggerLoadInterval)}},1e3)}}).fail(function(){$.sq_fields.sq_box.show();$.sq_fields.sq_preloading.hide();$.sq_fields.sq_errorloading.show()})};$.sq_triggerLoad=function(message){if(typeof $.sq_config.div==="undefined"){$.sq_initialize()}if(typeof $.sq_blockbriefcase!=="undefined"&&typeof $.sq_blockseo!=="undefined"&&typeof $.sq_blocksearch!=="undefined"){$.sq_blockbriefcase.trigger(message);$.sq_blockseo.trigger(message);$.sq_blocksearch.trigger(message);$.sq_config.div.trigger(message);return true}else{return false}};$.sq_savePost=function(){var $sq_seo=[];$.sq_config.div.find('input[name="sq_seo[]"]').each(function(){$sq_seo.push(this.value)});if($.sq_blockbriefcase){$.sq_blockbriefcase.trigger("briefcase.save")}$.post($.sq_config.ajaxurl,{action:"sq_ajax_save_post",sq_nonce:$.sq_config.sq_nonce,post_id:$.sq_config.postID,sq_keyword:$.sq_config.keyword,referer:"backend",sq_seo:$sq_seo})};$.sq_editor={getIframeEditor:function(element){var $this=$("#wpcontent");if(typeof element==="undefined"){element="#tinymce"}if($.sq_isGutenberg()){if($this.find("#editor").find("div.edit-post-visual-editor").length>0){return $this.find("#editor").find("div.edit-post-visual-editor")}if($this.find("#editor").find("div.edit-post-text-editor__body").length>0){return $this.find("#editor").find("div.edit-post-text-editor__body")}}if($this.find("#post").length>0&&$this.find("#post").find("iframe").length>0){if($this.find(".mce-container").find("iframe").contents().find(element+".has-focus").length>0){return $(".mce-container").find("iframe").contents().find(element+".has-focus")}if($this.find(".mce-container").find("iframe").contents().find(element).length>0){return $this.find(".mce-container").find("iframe").contents().find(element)}if($this.find("#content_ifr").contents().find(element).length>0){return $this.find("#content_ifr").contents().find(element)}if($this.find(".cke_contents").find("iframe").contents().find("body").length>0){return $this.find(".cke_contents").find("iframe").contents().find("body")}if($this.find("#cke_wysiwyg_frame").contents().find("body").length>0){return $this.find("#cke_wysiwyg_frame").contents().find("body")}}return false},getTinymceEditor:function(ed){var editor;if(typeof ed!=="undefined"&&typeof ed==="object"){editor=ed;if(typeof editor.activeEditor==="object")editor=editor.activeEditor}else{if(typeof tinyMCE==="object"){editor=tinyMCE;if(typeof tinyMCE.get("content")!=="undefined"){editor=tinyMCE.get("content")}else{if(typeof tinyMCE.activeEditor==="object"&&tinyMCE.activeEditor!==null){editor=tinyMCE.activeEditor}else{if(document.getElementById("content")!==null){editor=new tinymce.Editor("content");editor.contentCSS=["/wp-content/plugins/squirrly-seo/themes/default/css/sq_frontend.css"]}}}}}return editor},getBlockEditor:function(action){if($.sq_isGutenberg()){if(action==="select"){var ed=window.wp.data.select("core/editor")}else{var ed=window.wp.data.dispatch("core/editor")}return ed}return false},getFrontendEditor:function(action){if($.sq_isFrontend()){if(typeof window.sq_editor!=="undefined"){return window.sq_editor}}return false},createEditorButton:function(name){if($.sq_isFrontend()&&$("."+name).length==0){$("body").append('<button type="button" class="'+name+'"><i class="sq_logo" ></i></button>')}else if($.sq_isGutenberg()){if($(".edit-post-more-menu").length>0){$(".edit-post-more-menu").before('<button type="button" class="sq-position-static '+name+'"><i class="sq_logo" ></i></button>')}else if($(".interface-pinned-items").length>0){$(".interface-pinned-items").after('<button type="button" class="sq-ml-2 sq-position-static '+name+'"><i class="sq_logo" ></i></button>')}else if($(".edit-post-header__settings").length>0){$(".edit-post-header__settings").append('<button type="button" class="sq-position-static '+name+'"><i class="sq_logo" ></i></button>')}}else{$("body").append('<button type="button" class="'+name+'"><i class="sq_logo" ></i></button>')}},listenHtml:function(e){if(e.originalEvent.dataTransfer===null)return;var img=e.originalEvent.dataTransfer.getData("text");if($("#"+$(img).attr("id")).parent("li").attr("class")==="sq_search_img_li"){$.sq_fields.wp_content.val($.sq_fields.wp_content.val()+$.sq_blocksearch.packimg($(img).attr("id"),$("#"+$(img).attr("id")).parent("li").attr("src"),$("#"+$(img).attr("id")).parent("li")))}},listen:function(e){if($("#"+e.target.id).parent("li").attr("class")==="sq_search_img_li"){if($.sq_editor.lastimage!==$("#"+e.target.id).parent("li").attr("src")){$.sq_editor.insert($.sq_blocksearch.packimg(e.target.id,$("#"+e.target.id).parent("li").attr("src"),$("#"+e.target.id).parent("li")))}}$.sq_editor.lastimage=$("#"+e.target.id).parent("li").attr("src")},setContent:function(content,ed){if($.sq_config.editor_type==="tinymce"){var editor=$.sq_editor.getTinymceEditor(ed);if(typeof editor!=="undefined"){editor.setContent(content)}}},insert:function(content,ed){if($.sq_isDiviBuilder()||$.sq_isFrontend()){var input=document.createElement("textarea");document.body.prepend(input);input.value=content;input.focus();input.select();try{document.execCommand("copy");alert("We've copied the code and you can paste it in the Page Builder.")}catch(e){alert("You can copy the box and paste it in the Page Builder")}input.remove();if($(".edit-post-layout__content").length>0){$(".edit-post-layout__content").animate({scrollTop:$(".edit-post-layout__content").scrollTop()+$("#et_pb_layout").offset().top-50},"slow")}else{$("html,body").animate({scrollTop:$("#et_pb_layout").offset().top-50},"slow")}}else if($("#wpb_visual_composer:visible").length>0){var input=document.createElement("textarea");document.body.prepend(input);input.value=content;input.focus();input.select();try{document.execCommand("copy");alert("Visual Composer detected. We've copied the code and you can paste it in Visual Composer Editor.")}catch(e){alert("Visual Composer detected. You can copy the box and paste it in Visual Composer")}input.remove();if($(".edit-post-layout__content").length>0){$(".edit-post-layout__content").animate({scrollTop:$(".edit-post-layout__content").scrollTop()+$("#wpb_visual_composer").offset().top-50},"slow")}else{$("html,body").animate({scrollTop:$("#wpb_visual_composer").offset().top-50},"slow")}}else if($("#elementor-switch-mode-input").length>0&&$("#elementor-switch-mode-input").val()=="builder"){var input=document.createElement("textarea");document.body.appendChild(input);input.value=content;input.focus();input.select();try{document.execCommand("copy");alert("Elementor is detected. We've copied the code and you can paste it in Elementor Text Editor.")}catch(e){alert("Elementor detected. You can copy the box and paste it in Elementor Text Editor")}input.remove()}else if($("div.wp-editor-container").find("div.cs-editor-container.pro").length>0){var input=document.createElement("textarea");document.body.appendChild(input);input.value=content;input.focus();input.select();try{document.execCommand("copy");alert("Themeco PRO is detected. We've copied the code and you can paste it in Themeco PRO Text Editor.")}catch(e){alert("Themeco PRO detected. You can copy the box and paste it in Themeco PRO Text Editor")}input.remove()}else if($.sq_config.editor_type==="tinymce"){if(typeof tinyMCE==="object"){var editor=tinyMCE;if(typeof editor.activeEditor==="object"){editor=editor.activeEditor}}if(typeof editor!=="undefined"&&editor!==null){if(typeof editor.selection!=="undefined"){editor.selection.setContent(content)}else{editor.setContent(content)}$.sq_blockseo.callback()}}else{$.sq_fields.wp_content.val($.sq_fields.wp_content.val().substr(0,$.sq_fields.wp_content[0].selectionStart)+content+$.sq_fields.wp_content.val().substr($.sq_fields.wp_content[0].selectionEnd));$.sq_blockseo.callback()}}};$.sq_tinymce={callback:function(ed){if(ed.id!=="content")return false;var editor=$.sq_editor.getTinymceEditor(ed);if(typeof editor!=="undefined"&&typeof $.sq_blockseo==="object"){if($.sq_config.editor_type==="tinymce"){$.sq_blockseo.callback()}}},setup:function(ed){},addEvents:function(ed,dom){if(typeof $.sq_blockseo!=="undefined"&&typeof $.sq_editor==="object"&&!$.isDom($.sq_editor)){if($.sq_config.active_editor=$.sq_editor.getIframeEditor()){$.sq_blockseo.callback()}}}};$.fn.sq_main=function(){var $this=this;$this.load=function(){$.sq_setfields();$.sq_setParams();$.sq_initialized=true;$.sq_loadtabs();$.sq_highlight=function(element,text,params){var options=$.extend({element:"mark","acrossElements ":1,ignoreJoiners:1,diacritics:false,separateWordSearch:false,caseSensitive:false,accuracy:{value:"exactly",limiters:["`","~","!","@","#","$","%","^","&","*","(",")","-","_","=","+","{","}","[","]","\\","|",":",";","'",'"',",",".","<",">","/","?","“","”"]},ignorePunctuation:[" ",",","`","~","!","@","#","$","%","^","*","(",")","-","_","=","+","{","}","[","]","\\","|",":",";","'",'"',"<",">","/","?"],counter:1},params);if(typeof element!=="undefined"&&element.html()!==""&&$.isFunction(element.sq_unmark)){if(typeof options.range!=="undefined"){element.sq_unmark({done:function(){element.sq_markRanges(options.range,options)}})}else{element.sq_unmark({done:function(){element.sq_mark(text,options)}})}}};$.sq_removeHighlight=function(element){if(typeof element!=="undefined"&&$.isFunction(element.sq_unmark)&&!$.sq_isDiviBuilder()){element.sq_unmark()}};if($.isFunction($.sq_fields.sq_briefcase_list.sq_briefcase)){$.sq_blockbriefcase=$.sq_fields.sq_briefcase_list.sq_briefcase([])}if($.isFunction($.sq_config.div.sq_frontend)){$.sq_frontend=$.sq_config.div.sq_frontend([]);$.sq_frontend.init()}if($.sq_fields.div_blockseo.length>0&&$.isFunction($.sq_fields.div_blockseo.sq_blockseo)){$.sq_blockseo=$.sq_fields.div_blockseo.sq_blockseo([])}if($.sq_fields.div_blocksearch.length>0&&$.isFunction($.sq_fields.div_blocksearch.sq_blocksearch)){$.sq_blocksearch=$.sq_fields.div_blocksearch.sq_blocksearch([])}if($.isFunction($.sq_config.div.sq_floating)){$.sq_floating=$.sq_config.div.sq_floating([]);if(!$.sq_frontend){$.sq_floating.init()}}$.sq_checkin()};return $this};$.sq_loadtabs=function(){$.sq_fields.sq_blocktabs.find("div").on("click",function(){$.sq_fields.sq_selectit.trigger("click");$.sq_fields.sq_blocktabs.find("div").removeClass("sq_active");$(this).addClass("sq_active");$(".sq_block_steps").hide();$($(this).data("target")).show()});$.sq_fields.sq_blocksteps.find(".sq_nextstep").on("click",function(){$('.sq_block_tab[data-target="'+$(this).data("target")+'"]').trigger("click")})};$.sq_initialize=function(){$.sq_setConfig();if(typeof $.sq_config.div!=="undefined"&&!$.sq_initialized&&$.sq_config.div.length>0){$.sq_config.div.sq_main().load()}};$(document).ready(function(){$.sq_initialize()});window.onerror=function(){if(typeof $.sq_config.div==="undefined"){$.sq_initialize()}};$(document).ajaxSuccess(function(event){if(typeof $.sq_config.div==="undefined"){$.sq_initialize()}})})(jQuery);