Custom Twitter Feeds - Version 1.8.3

Version Description

  • Tweak: Added "noopener" attribute to hasthags and account tags linked in tweets.
  • Fix: Fixed a compatibility issue with the Complianz Cookie Consent plugin integration.
  • Fix: Fixed a compatibility issue with the Web Toffee GDPR Cookie Consent plugin integration.
  • Fix: Bio text was missing from the header even when this feature was enabled.
Download this release

Release Info

Developer Craig at Smash Balloon
Plugin Icon 128x128 Custom Twitter Feeds
Version 1.8.3
Comparing to
See all releases

Code changes from version 1.8.2 to 1.8.3

README.txt CHANGED
@@ -5,7 +5,7 @@ Support Website: http://smashballoon/custom-twitter-feeds/
5
  Tags: Twitter, Twitter feed, Twitter Tweets, Twitter widget, Custom Twitter Feed
6
  Requires at least: 3.4
7
  Tested up to: 5.8
8
- Stable tag: 1.8.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -233,6 +233,12 @@ If you're still having trouble displaying your Tweets after trying the common is
233
  7. To display a Twitter feed just copy and paste the shortcode into a Twitter widget or page
234
 
235
  == Changelog ==
 
 
 
 
 
 
236
  = 1.8.2 =
237
  * Tested with WordPress 5.8 update.
238
  * Fix: "Display your feed" tab was showing the wrong shortcode for the "layout" setting available in the pro version.
5
  Tags: Twitter, Twitter feed, Twitter Tweets, Twitter widget, Custom Twitter Feed
6
  Requires at least: 3.4
7
  Tested up to: 5.8
8
+ Stable tag: 1.8.3
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
233
  7. To display a Twitter feed just copy and paste the shortcode into a Twitter widget or page
234
 
235
  == Changelog ==
236
+ = 1.8.3 =
237
+ * Tweak: Added "noopener" attribute to hasthags and account tags linked in tweets.
238
+ * Fix: Fixed a compatibility issue with the Complianz Cookie Consent plugin integration.
239
+ * Fix: Fixed a compatibility issue with the Web Toffee GDPR Cookie Consent plugin integration.
240
+ * Fix: Bio text was missing from the header even when this feature was enabled.
241
+
242
  = 1.8.2 =
243
  * Tested with WordPress 5.8 update.
244
  * Fix: "Display your feed" tab was showing the wrong shortcode for the "layout" setting available in the pro version.
changelog.txt CHANGED
@@ -1,4 +1,15 @@
1
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
2
  = 1.8.1 =
3
  * Fix: Fixed several issues with GDPR Cookie Consent by Web Toffee integration.
4
 
1
  == Changelog ==
2
+ = 1.8.3 =
3
+ * Tweak: Added "noopener" attribute to hasthags and account tags linked in tweets.
4
+ * Fix: Fixed a compatibility issue with the Complianz Cookie Consent plugin integration.
5
+ * Fix: Fixed a compatibility issue with the Web Toffee GDPR Cookie Consent plugin integration.
6
+ * Fix: Bio text was missing from the header even when this feature was enabled.
7
+
8
+ = 1.8.2 =
9
+ * Tested with WordPress 5.8 update.
10
+ * Fix: "Display your feed" tab was showing the wrong shortcode for the "layout" setting available in the pro version.
11
+ * Fix: Fixed an issue with GDPR Cookie Consent by Web Toffee integration.
12
+
13
  = 1.8.1 =
14
  * Fix: Fixed several issues with GDPR Cookie Consent by Web Toffee integration.
15
 
custom-twitter-feed.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Custom Twitter Feeds
4
  Plugin URI: http://smashballoon.com/custom-twitter-feeds
5
  Description: Customizable Twitter feeds for your website
6
- Version: 1.8.2
7
  Author: Smash Balloon
8
  Author URI: http://smashballoon.com/
9
  Text Domain: custom-twitter-feeds
@@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
  */
25
 
26
  define( 'CTF_URL', plugin_dir_path( __FILE__ ) );
27
- define( 'CTF_VERSION', '1.8.2' );
28
  define( 'CTF_TITLE', 'Custom Twitter Feeds' );
29
  define( 'CTF_JS_URL', plugins_url( '/js/ctf-scripts.min.js?ver=' . CTF_VERSION , __FILE__ ) );
30
  define( 'OAUTH_PROCESSOR_URL', 'https://api.smashballoon.com/twitter-login.php?return_uri=' );
@@ -580,6 +580,9 @@ function ctf_activate() {
580
  // set usage tracking to false if fresh install.
581
  $usage_tracking = get_option( 'ctf_usage_tracking', false );
582
 
 
 
 
583
  if ( ! is_array( $usage_tracking ) ) {
584
  $usage_tracking = array(
585
  'enabled' => false,
3
  Plugin Name: Custom Twitter Feeds
4
  Plugin URI: http://smashballoon.com/custom-twitter-feeds
5
  Description: Customizable Twitter feeds for your website
6
+ Version: 1.8.3
7
  Author: Smash Balloon
8
  Author URI: http://smashballoon.com/
9
  Text Domain: custom-twitter-feeds
24
  */
25
 
26
  define( 'CTF_URL', plugin_dir_path( __FILE__ ) );
27
+ define( 'CTF_VERSION', '1.8.3' );
28
  define( 'CTF_TITLE', 'Custom Twitter Feeds' );
29
  define( 'CTF_JS_URL', plugins_url( '/js/ctf-scripts.min.js?ver=' . CTF_VERSION , __FILE__ ) );
30
  define( 'OAUTH_PROCESSOR_URL', 'https://api.smashballoon.com/twitter-login.php?return_uri=' );
580
  // set usage tracking to false if fresh install.
581
  $usage_tracking = get_option( 'ctf_usage_tracking', false );
582
 
583
+ global $wp_roles;
584
+ $wp_roles->add_cap( 'administrator', 'manage_custom_twitter_feeds_options' );
585
+
586
  if ( ! is_array( $usage_tracking ) ) {
587
  $usage_tracking = array(
588
  'enabled' => false,
inc/CtfAdmin.php CHANGED
@@ -16,14 +16,28 @@ class CtfAdmin
16
  {
17
  add_action( 'admin_menu', array( $this, 'add_menu' ) );
18
  add_action( 'admin_init', array( $this, 'options_page_init' ) );
 
 
 
 
 
 
 
 
 
 
19
  }
20
 
21
  public function add_menu()
22
  {
 
 
 
 
23
  add_menu_page(
24
  'Twitter Feeds',
25
  'Twitter Feeds',
26
- 'manage_options',
27
  'custom-twitter-feeds',
28
  array( $this, 'create_options_page' ),
29
  '',
@@ -34,7 +48,7 @@ class CtfAdmin
34
  'custom-twitter-feeds',
35
  'Customize',
36
  'Customize',
37
- 'manage_options',
38
  'custom-twitter-feeds-customize',
39
  array( $this, 'create_submenu_page_customize' )
40
  );
@@ -43,7 +57,7 @@ class CtfAdmin
43
  'custom-twitter-feeds',
44
  'Style',
45
  'Style',
46
- 'manage_options',
47
  'custom-twitter-feeds-style',
48
  array( $this, 'create_submenu_page_style' )
49
  );
@@ -88,7 +102,7 @@ class CtfAdmin
88
  'custom-twitter-feeds',
89
  __( 'Social Wall', 'ctf' ),
90
  '<span><svg style="height: 14px; margin: 0 8px 0 0; position: relative; top: 2px;" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="th" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-th fa-w-16 fa-2x"><path fill="currentColor" d="M149.333 56v80c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V56c0-13.255 10.745-24 24-24h101.333c13.255 0 24 10.745 24 24zm181.334 240v-80c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.256 0 24.001-10.745 24.001-24zm32-240v80c0 13.255 10.745 24 24 24H488c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24zm-32 80V56c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.256 0 24.001-10.745 24.001-24zm-205.334 56H24c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24zM0 376v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H24c-13.255 0-24 10.745-24 24zm386.667-56H488c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24zm0 160H488c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24zM181.333 376v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24z" class=""></path></svg>' . __( 'Social Wall', 'ctf' ) . '</span>',
91
- 'manage_options',
92
  'ctf-sw',
93
  array( $this, 'social_wall_page' )
94
  );
@@ -97,7 +111,7 @@ class CtfAdmin
97
  'custom-twitter-feeds',
98
  __( 'Try the Pro Demo', 'ctf' ),
99
  __( '<span class="ctf_get_pro">Try the Pro Demo</span>', 'custom-twitter-feeds' ),
100
- 'manage_options',
101
  'https://smashballoon.com/custom-twitter-feeds/demo/?utm_campaign=twitter-free&utm_source=menu-link&utm_medium=upgrade-link',
102
  ''
103
  );
16
  {
17
  add_action( 'admin_menu', array( $this, 'add_menu' ) );
18
  add_action( 'admin_init', array( $this, 'options_page_init' ) );
19
+ add_action( 'admin_init', array( $this, 'ctf_current_user_can' ) );
20
+ }
21
+
22
+ public function ctf_current_user_can( $cap ) {
23
+ if ( $cap === 'manage_custom_twitter_feeds_options' ) {
24
+ $cap = current_user_can( 'manage_custom_twitter_feeds_options' ) ? 'manage_custom_twitter_feeds_options' : 'manage_options';
25
+ }
26
+ $cap = apply_filters( 'ctf_settings_pages_capability', $cap );
27
+
28
+ return current_user_can( $cap );
29
  }
30
 
31
  public function add_menu()
32
  {
33
+ $cap = current_user_can( 'manage_custom_twitter_feeds_options' ) ? 'manage_custom_twitter_feeds_options' : 'manage_options';
34
+
35
+ $cap = apply_filters( 'ctf_settings_pages_capability', $cap );
36
+
37
  add_menu_page(
38
  'Twitter Feeds',
39
  'Twitter Feeds',
40
+ $cap,
41
  'custom-twitter-feeds',
42
  array( $this, 'create_options_page' ),
43
  '',
48
  'custom-twitter-feeds',
49
  'Customize',
50
  'Customize',
51
+ $cap,
52
  'custom-twitter-feeds-customize',
53
  array( $this, 'create_submenu_page_customize' )
54
  );
57
  'custom-twitter-feeds',
58
  'Style',
59
  'Style',
60
+ $cap,
61
  'custom-twitter-feeds-style',
62
  array( $this, 'create_submenu_page_style' )
63
  );
102
  'custom-twitter-feeds',
103
  __( 'Social Wall', 'ctf' ),
104
  '<span><svg style="height: 14px; margin: 0 8px 0 0; position: relative; top: 2px;" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="th" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-th fa-w-16 fa-2x"><path fill="currentColor" d="M149.333 56v80c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V56c0-13.255 10.745-24 24-24h101.333c13.255 0 24 10.745 24 24zm181.334 240v-80c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.256 0 24.001-10.745 24.001-24zm32-240v80c0 13.255 10.745 24 24 24H488c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24zm-32 80V56c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.256 0 24.001-10.745 24.001-24zm-205.334 56H24c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24zM0 376v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H24c-13.255 0-24 10.745-24 24zm386.667-56H488c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24zm0 160H488c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24zM181.333 376v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24z" class=""></path></svg>' . __( 'Social Wall', 'ctf' ) . '</span>',
105
+ $cap,
106
  'ctf-sw',
107
  array( $this, 'social_wall_page' )
108
  );
111
  'custom-twitter-feeds',
112
  __( 'Try the Pro Demo', 'ctf' ),
113
  __( '<span class="ctf_get_pro">Try the Pro Demo</span>', 'custom-twitter-feeds' ),
114
+ $cap,
115
  'https://smashballoon.com/custom-twitter-feeds/demo/?utm_campaign=twitter-free&utm_source=menu-link&utm_medium=upgrade-link',
116
  ''
117
  );
inc/CtfFeed.php CHANGED
@@ -891,7 +891,7 @@ class CtfFeed
891
  $trimmed_tweets = array();
892
 
893
  // for header
894
- if ( $this->last_id_data == '' && isset( $tweets[0] ) ) { // if this is the first set of tweets
895
  $trimmed_tweets[0]['user']['name']= $tweets[0]['user']['name'];
896
  $trimmed_tweets[0]['user']['description']= $tweets[0]['user']['description'];
897
  $trimmed_tweets[0]['user']['statuses_count']= $tweets[0]['user']['statuses_count'];
891
  $trimmed_tweets = array();
892
 
893
  // for header
894
+ if ( isset( $tweets[0] ) ) { // if this is the first set of tweets
895
  $trimmed_tweets[0]['user']['name']= $tweets[0]['user']['name'];
896
  $trimmed_tweets[0]['user']['description']= $tweets[0]['user']['description'];
897
  $trimmed_tweets[0]['user']['statuses_count']= $tweets[0]['user']['statuses_count'];
inc/class-ctf-gdpr-integrations.php CHANGED
@@ -35,16 +35,17 @@ class CTF_GDPR_Integrations {
35
  *
36
  * @since 1.7/1.12
37
  */
38
- public static function undo_script_blocking( $return ) {
39
- $settings = ctf_get_database_settings();
40
- if ( ! CTF_GDPR_Integrations::doing_gdpr( $settings ) ) {
41
- return $return;
42
- }
43
- remove_filter( 'wt_cli_third_party_scripts', 'wt_cli_twitter_feed_script' );
 
44
  remove_filter( 'cmplz_known_script_tags', 'cmplz_twitter_feed_script' );
45
-
46
- return $return;
47
- }
48
 
49
  /**
50
  * Whether or not consent plugins that Twitter Feed
35
  *
36
  * @since 1.7/1.12
37
  */
38
+ public static function undo_script_blocking( $return ) {
39
+ $settings = ctf_get_database_settings();
40
+ if ( ! CTF_GDPR_Integrations::doing_gdpr( $settings ) ) {
41
+ return $return;
42
+ } unset( $return['twitter-feed'] );
43
+
44
+ remove_filter( 'wt_cli_third_party_scripts', 'wt_cli_twitter_feed_script' );
45
  remove_filter( 'cmplz_known_script_tags', 'cmplz_twitter_feed_script' );
46
+
47
+ return $return;
48
+ }
49
 
50
  /**
51
  * Whether or not consent plugins that Twitter Feed
js/ctf-scripts.js CHANGED
@@ -163,7 +163,7 @@ if(!ctf_js_exists){
163
  if (/^#[0-9A-F]{6}$/i.test(replacementString)) {
164
  return replacementString;
165
  } else {
166
- return ' <a href="https://twitter.com/hashtag/' + replacementString.substring(1) + '" target="_blank" rel="nofollow">' + replacementString + '</a>';
167
  }
168
  }
169
 
@@ -177,7 +177,7 @@ if(!ctf_js_exists){
177
  //Link @tags
178
  function ctfReplaceTags(tag) {
179
  var replacementString = tag.trim();
180
- return ' <a href="https://twitter.com/' + replacementString.substring(1) + '" target="_blank" rel="nofollow">' + replacementString + '</a>';
181
  }
182
 
183
  var tagRegex = /[\s][@]+[A-Za-z0-9-_]+/g;
@@ -347,13 +347,23 @@ if(!ctf_js_exists){
347
  });
348
 
349
  // Complianz by Really Simple Plugins
350
- $(document).on('cmplzAcceptAll', function (event) {
351
- ctfAterConsentToggled();
 
 
 
 
 
352
  });
353
 
354
  // Complianz by Really Simple Plugins
355
- $(document).on('cmplzRevoke', function (event) {
356
- ctfAterConsentToggled();
 
 
 
 
 
357
  });
358
 
359
  // Borlabs Cookie by Borlabs
@@ -389,7 +399,7 @@ if(!ctf_js_exists){
389
  window.ctfObject.consentGiven = (val === 'true');
390
  }
391
  } else if (typeof window.cookieconsent !== 'undefined') { // Complianz by Really Simple Plugins
392
- window.ctfObject.consentGiven = ctfCmplzGetCookie('complianz_consent_status') === 'allow';
393
  } else if (typeof window.Cookiebot !== "undefined") { // Cookiebot by Cybot A/S
394
  window.ctfObject.consentGiven = Cookiebot.consented;
395
  } else if (typeof window.BorlabsCookie !== 'undefined') { // Borlabs Cookie by Borlabs
163
  if (/^#[0-9A-F]{6}$/i.test(replacementString)) {
164
  return replacementString;
165
  } else {
166
+ return ' <a href="https://twitter.com/hashtag/' + replacementString.substring(1) + '" target="_blank" rel="nofollow noopener">' + replacementString + '</a>';
167
  }
168
  }
169
 
177
  //Link @tags
178
  function ctfReplaceTags(tag) {
179
  var replacementString = tag.trim();
180
+ return ' <a href="https://twitter.com/' + replacementString.substring(1) + '" target="_blank" rel="nofollow noopener">' + replacementString + '</a>';
181
  }
182
 
183
  var tagRegex = /[\s][@]+[A-Za-z0-9-_]+/g;
347
  });
348
 
349
  // Complianz by Really Simple Plugins
350
+ $(document).on('cmplzEnableScripts', function (event) {
351
+ if ( event.detail === 'marketing' ) {
352
+ $('.ctf').each(function () {
353
+ window.ctfObject.consentGiven = true;
354
+ ctfAterConsentToggled();
355
+ });
356
+ }
357
  });
358
 
359
  // Complianz by Really Simple Plugins
360
+ $(document).on('cmplzFireCategories', function (event) {
361
+ if ( event.detail.category === 'marketing' ) {
362
+ $('.ctf').each(function () {
363
+ window.ctfObject.consentGiven = true;
364
+ ctfAterConsentToggled();
365
+ });
366
+ }
367
  });
368
 
369
  // Borlabs Cookie by Borlabs
399
  window.ctfObject.consentGiven = (val === 'true');
400
  }
401
  } else if (typeof window.cookieconsent !== 'undefined') { // Complianz by Really Simple Plugins
402
+ window.ctfObject.consentGiven = ( ctfCmplzGetCookie('cmplz_consent_status') === 'allow' || jQuery('body').hasClass('cmplz-status-marketing') );
403
  } else if (typeof window.Cookiebot !== "undefined") { // Cookiebot by Cybot A/S
404
  window.ctfObject.consentGiven = Cookiebot.consented;
405
  } else if (typeof window.BorlabsCookie !== 'undefined') { // Borlabs Cookie by Borlabs
js/ctf-scripts.min.js CHANGED
@@ -1 +1 @@
1
- var ctf_js_exists=void 0!==ctf_js_exists;ctf_js_exists||function(u){function t(){if(window.ctfObject.consentGiven||!window.ctfObject.gdpr)return!0;if("undefined"!=typeof CLI_Cookie)null!==CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)&&(null!==CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")&&(window.ctfObject.consentGiven="yes"===CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")),null!==CLI_Cookie.read("cookielawinfo-checkbox-necessary")&&(window.ctfObject.consentGiven="yes"===CLI_Cookie.read("cookielawinfo-checkbox-necessary")));else if(void 0!==window.cnArgs){var u=("; "+document.cookie).split("; cookie_notice_accepted=");if(2===u.length){var t=u.pop().split(";").shift();window.ctfObject.consentGiven="true"===t}}else void 0!==window.cookieconsent?window.ctfObject.consentGiven="allow"===function(u){for(var t=u+"=",e=window.document.cookie.split(";"),n=0;n<e.length;n++){var a=e[n].trim();if(0==a.indexOf(t))return a.substring(t.length,a.length)}return""}("complianz_consent_status"):void 0!==window.Cookiebot?window.ctfObject.consentGiven=Cookiebot.consented:void 0!==window.BorlabsCookie&&(window.ctfObject.consentGiven=window.BorlabsCookie.checkCookieConsent("twitter"));var e=jQuery.Event("ctfcheckconsent");return e.feed=this,jQuery(window).trigger(e),window.ctfObject.consentGiven}function e(t){t.find(".ctf-hide-avatar").length&&!t.find(".ctf-hide-avatar.ctf-no-consent").length||t.find(".ctf-item").addClass("ctf-hide-avatar ctf-no-consent"),u(".ctf-header-img span").length&&u(".ctf-header-img").addClass("ctf-no-consent")}function n(t){c(),t.find(".ctf-item.ctf-no-consent").removeClass("ctf-hide-avatar"),t.find(".ctf-author-avatar").each(function(){u(this).find("span").replaceWith('<img src="'+u(this).find("span").attr("data-avatar")+'" alt="'+u(this).find("span").attr("data-alt")+'" width="48" height="48">')}),t.find(".ctf-header-img").each(function(){u(this).find("span").replaceWith('<img src="'+u(this).find("span").attr("data-avatar")+'" alt="'+u(this).find("span").attr("data-alt")+'" width="48" height="48">')}),t.find(".ctf-no-consent").removeClass("ctf-no-consent"),t.find(".ctf-header .ctf-header-link").on("mouseenter mouseleave",function(u){switch(u.type){case"mouseenter":t.find(".ctf-header .ctf-header-img-hover").fadeIn(200);break;case"mouseleave":t.find(".ctf-header .ctf-header-img-hover").stop().fadeOut(600)}})}function a(){t()&&u(".ctf").each(function(){n(u(this))})}function c(){void 0===window.ctfObject.intentsIncluded&&(window.ctfObject.intentsIncluded=!1),u(".ctf").each(function(){window.ctfObject.intentsIncluded||void 0===u(this).attr("data-ctfintents")||(window.ctfObject.intentsIncluded=!0,function(){if(!window.__twitterIntentHandler){var u=/twitter\.com\/intent\/(\w+)/,t="scrollbars=yes,resizable=yes,toolbar=no,location=yes",e=550,n=420,a=screen.height,c=screen.width;document.addEventListener?document.addEventListener("click",i,!1):document.attachEvent&&document.attachEvent("onclick",i),window.__twitterIntentHandler=!0}function i(i){for(var o,s,d=(i=i||window.event).target||i.srcElement;d&&"a"!==d.nodeName.toLowerCase();)d=d.parentNode;d&&"a"===d.nodeName.toLowerCase()&&d.href&&d.href.match(u)&&(o=Math.round(c/2-e/2),s=0,a>n&&(s=Math.round(a/2-n/2)),window.open(d.href,"intent",t+",width="+e+",height="+n+",left="+o+",top="+s),i.returnValue=!1,i.preventDefault&&i.preventDefault())}}())})}function i(u){var t="content";return u.closest("footer").length?t="footer":u.closest(".header").length||u.closest("header").length?t="header":(u.closest(".sidebar").length||u.closest("aside").length)&&(t="sidebar"),t}window.ctf_init=function(){if(window.ctfObject={},u(".ctf").length&&void 0!==u(".ctf").first().attr("data-ctf-flags")){var a=u(".ctf").first().attr("data-ctf-flags").split(",");if(a.indexOf("gdpr")>-1?(window.ctfObject.consentGiven=!1,window.ctfObject.gdpr=!0):(window.ctfObject.consentGiven=!0,window.ctfObject.gdpr=!1),a.indexOf("locator")>-1){var o=Math.floor(Math.random()*u(".ctf").length);window.ctfObject.locator=1===u(".ctf").length||1===o}else window.ctfObject.locator=!1}else window.ctfObject.consentGiven=!0,window.ctfObject.gdpr=!1,window.ctfObject.locator=!1;function s(a){if(a.addClass("ctf_is_initialized"),window.ctfObject.locator){var c=(a.attr("data-feed-id"),a.attr("data-feed-id")),o=(a.attr("data-postid"),a.attr("data-postid"));jQuery.ajax({url:ctf.ajax_url,type:"post",data:{action:"ctf_do_locator",atts:a.attr("data-ctfshortcode"),feed_id:c,location:i(a),post_id:o},success:function(u){}})}t()?n(a):e(a),a.find(".ctf-item.ctf-new").each(function(){var t,e,n,c,i,o,s=u(this),d=s.find(".ctf-tweet-text-media-wrap"),r=s.find(".ctf-tweet-text").remove(".ctf-tweet-text-media-wrap"),f=" "+r.html();if("true"!=a.attr("data-ctfdisablelinks")&&void 0!==f&&!a.find(".ctf-tweet-text-link").length){var A=a.attr("data-ctflinktextcolor"),l="";A&&(l=A.replace(";","").split("#")[1]),window.ctfLinkify=(t="[a-z\\d.-]+://",e="mailto:",n=new RegExp("(?:\\b[a-z\\d.-]+://[^<>\\s]+|\\b(?:(?:(?:[^\\s!@#$%^&*()_=+[\\]{}\\\\|;:'\",.<>/?]+)\\.)+(?:ac|ad|aero|ae|af|ag|ai|al|am|an|ao|aq|arpa|ar|asia|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|biz|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|cat|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|coop|com|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|info|int|in|io|iq|ir|is|it|je|jm|jobs|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mobi|mo|mp|mq|mr|ms|mt|museum|mu|mv|mw|mx|my|mz|name|na|nc|net|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pro|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tel|tf|tg|th|tj|tk|tl|tm|tn|to|tp|travel|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|xn--0zwm56d|xn--11b5bs3a9aj6g|xn--80akhbyknj4f|xn--9t4b11yi5a|xn--deba0ad|xn--g6w251d|xn--hgbk6aj7f53bba|xn--hlcj6aya9esc7a|xn--jxalpdlp|xn--kgbechtv|xn--zckzah|ye|yt|yu|za|zm|zw)|(?:(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5]))(?:[;/][^#?<>\\s]*)?(?:\\?[^#<>\\s]*)?(?:#[^<>\\s]*)?(?!\\w)|(?:mailto:)?[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:(?:(?:[^\\s!@#$%^&*()_=+[\\]{}\\\\|;:'\",.<>/?]+)\\.)+(?:ac|ad|aero|ae|af|ag|ai|al|am|an|ao|aq|arpa|ar|asia|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|biz|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|cat|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|coop|com|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|info|int|in|io|iq|ir|is|it|je|jm|jobs|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mobi|mo|mp|mq|mr|ms|mt|museum|mu|mv|mw|mx|my|mz|name|na|nc|net|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pro|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tel|tf|tg|th|tj|tk|tl|tm|tn|to|tp|travel|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|xn--0zwm56d|xn--11b5bs3a9aj6g|xn--80akhbyknj4f|xn--9t4b11yi5a|xn--deba0ad|xn--g6w251d|xn--hgbk6aj7f53bba|xn--hlcj6aya9esc7a|xn--jxalpdlp|xn--kgbechtv|xn--zckzah|ye|yt|yu|za|zm|zw)|(?:(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5]))(?:\\?[^#<>\\s]*)?(?:#[^<>\\s]*)?(?!\\w))","ig"),c=new RegExp("^"+t,"i"),i={"'":"`",">":"<",")":"(","]":"[","}":"{","B;":"B+","b:":"b9"},o={callback:function(u,t){return t?'<a href="'+t+'" title="'+t+'" target="_blank">'+u+"</a>":u},punct_regexp:/(?:[!?.,:;'"]|(?:&|&amp;)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)$/},function(u,t){t=t||{};var a,s,d,r,f,A,l,F,h,m,C,w,g="",B=[];for(s in o)void 0===t[s]&&(t[s]=o[s]);for(;a=n.exec(u);)if(d=a[0],l=(A=n.lastIndex)-d.length,!/[\/:]/.test(u.charAt(l-1))){do{F=d,w=d.substr(-1),(C=i[w])&&(h=d.match(new RegExp("\\"+C+"(?!$)","g")),m=d.match(new RegExp("\\"+w,"g")),(h?h.length:0)<(m?m.length:0)&&(d=d.substr(0,d.length-1),A--)),t.punct_regexp&&(d=d.replace(t.punct_regexp,function(u){return A-=u.length,""}))}while(d.length&&d!==F);r=d,c.test(r)||(r=(-1!==r.indexOf("@")?r.indexOf(e)?e:"":r.indexOf("irc.")?r.indexOf("ftp.")?"http://":"ftp://":"irc://")+r),f!=l&&(B.push([u.slice(f,l)]),f=A),B.push([d,r])}for(B.push([u.substr(f)]),s=0;s<B.length;s++)g+=t.callback.apply(window,B[s]);return g||u}),r.find("a").length||(r.find(".emoji").each(function(){u(this).replaceWith(u(this).attr("alt"))}),f=" "+r.html(),f=ctfLinkify(f));f.length>0&&(f=(f=f.replace(/<br>/g,"<br> ")).replace(/(^|\s)#(\w*[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]+\w*)/gi,function(u){var t=u.trim();return/^#[0-9A-F]{6}$/i.test(t)?t:' <a href="https://twitter.com/hashtag/'+t.substring(1)+'" target="_blank" rel="nofollow">'+t+"</a>"}));f=f.replace(/[\s][@]+[A-Za-z0-9-_]+/g,function(u){var t=u.trim();return' <a href="https://twitter.com/'+t.substring(1)+'" target="_blank" rel="nofollow">'+t+"</a>"}),r.html(f.trim()),r.append(d),r.find("a").css("color","#"+l),d.css("color","#"+l)}s.find(".ctf-tweet-text a").each(function(){jQuery(this).text().indexOf("http")>-1&&jQuery(this).text().length>63&&jQuery(this).text(jQuery(this).text().substring(0,60)+"...")})}),a.find(".ctf-author-name, .ctf-tweet-date, .ctf-author-screenname, .ctf-twitterlink, .ctf-author-box-link, .ctf-retweet-text, .ctf-quoted-tweet").css("color",a.find(".ctf-tweet-text").css("color")),a.find(".ctf_more").off("click").on("click",function(t){t.preventDefault(),u(this).hide().next(".ctf_remaining").show()}),"function"==typeof ctf_custom_js&&ctf_custom_js(u),a.find(".ctf-author-box-link p:empty").remove()}function d(u,t,e,n,a,c){n.addClass("ctf-loading").append('<div class="ctf-loader"></div>'),n.find(".ctf-loader").css("background-color",n.css("color"));var o=(e.attr("data-feed-id"),e.attr("data-feed-id")),d=(e.attr("data-postid"),e.attr("data-postid"));jQuery.ajax({url:ctf.ajax_url,type:"post",data:{action:"ctf_get_more_posts",last_id_data:u,shortcode_data:t,num_needed:a,persistent_index:c,feed_id:o,location:i(e),post_id:d},success:function(t){""!==u?(-1==t.indexOf("<meta charset")&&e.find(".ctf-item").removeClass("ctf-new").last().after(t),e.find(".ctf-out-of-tweets").length&&(n.hide(),e.find(".ctf-out-of-tweets p").eq(0).fadeIn().end().eq(1).delay(500).fadeIn())):e.find(".ctf-tweets").append(t),n.removeClass("ctf-loading").find(".ctf-loader").remove(),s(e)}})}u(".ctf").length<=u(".ctf_is_initialized").length||(window.ctfObject.consentGiven&&c(),u(".ctf").each(function(){var a=u(this),c=parseInt(a.attr("data-ctfneeded"));a.width()<=480&&a.addClass("ctf-narrow"),a.width()<=320&&a.addClass("ctf-super-narrow"),u(this).hasClass("ctf_is_initialized")||s(a),setTimeout(function(){if(c>0){var u=a.find(".ctf-more"),t=a.find(".ctf-item").last().attr("id"),e=a.find(".ctf-item").length;d(t,a.attr("data-ctfshortcode"),a,u,c,e)}},500),a.find(".ctf-more").on("click",function(){var t=u(this),e=a.find(".ctf-item").last().attr("id"),n=a.find(".ctf-item").length;d(e,a.attr("data-ctfshortcode"),a,t,0,n)}),a.find(".ctf-author-box-link p:empty").remove(),setTimeout(function(){t()?n(a):e(a)},500)}))},jQuery(document).ready(function(u){ctf_init(),u("#cookie-notice a").on("click",function(){setTimeout(function(){a()},1e3)}),u("#cookie-law-info-bar a").on("click",function(){setTimeout(function(){a()},1e3)}),u(".cli-user-preference-checkbox").on("click",function(){a()}),u(window).on("CookiebotOnAccept",function(u){a()}),u(document).on("cmplzAcceptAll",function(u){a()}),u(document).on("cmplzRevoke",function(u){a()}),u(document).on("borlabs-cookie-consent-saved",function(u){a()})})}(jQuery);
1
+ var ctf_js_exists=void 0!==ctf_js_exists;ctf_js_exists||function(u){function t(){if(window.ctfObject.consentGiven||!window.ctfObject.gdpr)return!0;if("undefined"!=typeof CLI_Cookie)null!==CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)&&(null!==CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")&&(window.ctfObject.consentGiven="yes"===CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")),null!==CLI_Cookie.read("cookielawinfo-checkbox-necessary")&&(window.ctfObject.consentGiven="yes"===CLI_Cookie.read("cookielawinfo-checkbox-necessary")));else if(void 0!==window.cnArgs){var u=("; "+document.cookie).split("; cookie_notice_accepted=");if(2===u.length){var t=u.pop().split(";").shift();window.ctfObject.consentGiven="true"===t}}else void 0!==window.cookieconsent?window.ctfObject.consentGiven="allow"===function(u){for(var t=u+"=",e=window.document.cookie.split(";"),n=0;n<e.length;n++){var a=e[n].trim();if(0==a.indexOf(t))return a.substring(t.length,a.length)}return""}("cmplz_consent_status")||jQuery("body").hasClass("cmplz-status-marketing"):void 0!==window.Cookiebot?window.ctfObject.consentGiven=Cookiebot.consented:void 0!==window.BorlabsCookie&&(window.ctfObject.consentGiven=window.BorlabsCookie.checkCookieConsent("twitter"));var e=jQuery.Event("ctfcheckconsent");return e.feed=this,jQuery(window).trigger(e),window.ctfObject.consentGiven}function e(t){t.find(".ctf-hide-avatar").length&&!t.find(".ctf-hide-avatar.ctf-no-consent").length||t.find(".ctf-item").addClass("ctf-hide-avatar ctf-no-consent"),u(".ctf-header-img span").length&&u(".ctf-header-img").addClass("ctf-no-consent")}function n(t){c(),t.find(".ctf-item.ctf-no-consent").removeClass("ctf-hide-avatar"),t.find(".ctf-author-avatar").each(function(){u(this).find("span").replaceWith('<img src="'+u(this).find("span").attr("data-avatar")+'" alt="'+u(this).find("span").attr("data-alt")+'" width="48" height="48">')}),t.find(".ctf-header-img").each(function(){u(this).find("span").replaceWith('<img src="'+u(this).find("span").attr("data-avatar")+'" alt="'+u(this).find("span").attr("data-alt")+'" width="48" height="48">')}),t.find(".ctf-no-consent").removeClass("ctf-no-consent"),t.find(".ctf-header .ctf-header-link").on("mouseenter mouseleave",function(u){switch(u.type){case"mouseenter":t.find(".ctf-header .ctf-header-img-hover").fadeIn(200);break;case"mouseleave":t.find(".ctf-header .ctf-header-img-hover").stop().fadeOut(600)}})}function a(){t()&&u(".ctf").each(function(){n(u(this))})}function c(){void 0===window.ctfObject.intentsIncluded&&(window.ctfObject.intentsIncluded=!1),u(".ctf").each(function(){window.ctfObject.intentsIncluded||void 0===u(this).attr("data-ctfintents")||(window.ctfObject.intentsIncluded=!0,function(){if(!window.__twitterIntentHandler){var u=/twitter\.com\/intent\/(\w+)/,t="scrollbars=yes,resizable=yes,toolbar=no,location=yes",e=550,n=420,a=screen.height,c=screen.width;document.addEventListener?document.addEventListener("click",i,!1):document.attachEvent&&document.attachEvent("onclick",i),window.__twitterIntentHandler=!0}function i(i){for(var o,s,d=(i=i||window.event).target||i.srcElement;d&&"a"!==d.nodeName.toLowerCase();)d=d.parentNode;d&&"a"===d.nodeName.toLowerCase()&&d.href&&d.href.match(u)&&(o=Math.round(c/2-e/2),s=0,a>n&&(s=Math.round(a/2-n/2)),window.open(d.href,"intent",t+",width="+e+",height="+n+",left="+o+",top="+s),i.returnValue=!1,i.preventDefault&&i.preventDefault())}}())})}function i(u){var t="content";return u.closest("footer").length?t="footer":u.closest(".header").length||u.closest("header").length?t="header":(u.closest(".sidebar").length||u.closest("aside").length)&&(t="sidebar"),t}window.ctf_init=function(){if(window.ctfObject={},u(".ctf").length&&void 0!==u(".ctf").first().attr("data-ctf-flags")){var a=u(".ctf").first().attr("data-ctf-flags").split(",");if(a.indexOf("gdpr")>-1?(window.ctfObject.consentGiven=!1,window.ctfObject.gdpr=!0):(window.ctfObject.consentGiven=!0,window.ctfObject.gdpr=!1),a.indexOf("locator")>-1){var o=Math.floor(Math.random()*u(".ctf").length);window.ctfObject.locator=1===u(".ctf").length||1===o}else window.ctfObject.locator=!1}else window.ctfObject.consentGiven=!0,window.ctfObject.gdpr=!1,window.ctfObject.locator=!1;function s(a){if(a.addClass("ctf_is_initialized"),window.ctfObject.locator){var c=(a.attr("data-feed-id"),a.attr("data-feed-id")),o=(a.attr("data-postid"),a.attr("data-postid"));jQuery.ajax({url:ctf.ajax_url,type:"post",data:{action:"ctf_do_locator",atts:a.attr("data-ctfshortcode"),feed_id:c,location:i(a),post_id:o},success:function(u){}})}t()?n(a):e(a),a.find(".ctf-item.ctf-new").each(function(){var t,e,n,c,i,o,s=u(this),d=s.find(".ctf-tweet-text-media-wrap"),r=s.find(".ctf-tweet-text").remove(".ctf-tweet-text-media-wrap"),f=" "+r.html();if("true"!=a.attr("data-ctfdisablelinks")&&void 0!==f&&!a.find(".ctf-tweet-text-link").length){var A=a.attr("data-ctflinktextcolor"),l="";A&&(l=A.replace(";","").split("#")[1]),window.ctfLinkify=(t="[a-z\\d.-]+://",e="mailto:",n=new RegExp("(?:\\b[a-z\\d.-]+://[^<>\\s]+|\\b(?:(?:(?:[^\\s!@#$%^&*()_=+[\\]{}\\\\|;:'\",.<>/?]+)\\.)+(?:ac|ad|aero|ae|af|ag|ai|al|am|an|ao|aq|arpa|ar|asia|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|biz|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|cat|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|coop|com|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|info|int|in|io|iq|ir|is|it|je|jm|jobs|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mobi|mo|mp|mq|mr|ms|mt|museum|mu|mv|mw|mx|my|mz|name|na|nc|net|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pro|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tel|tf|tg|th|tj|tk|tl|tm|tn|to|tp|travel|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|xn--0zwm56d|xn--11b5bs3a9aj6g|xn--80akhbyknj4f|xn--9t4b11yi5a|xn--deba0ad|xn--g6w251d|xn--hgbk6aj7f53bba|xn--hlcj6aya9esc7a|xn--jxalpdlp|xn--kgbechtv|xn--zckzah|ye|yt|yu|za|zm|zw)|(?:(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5]))(?:[;/][^#?<>\\s]*)?(?:\\?[^#<>\\s]*)?(?:#[^<>\\s]*)?(?!\\w)|(?:mailto:)?[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:(?:(?:[^\\s!@#$%^&*()_=+[\\]{}\\\\|;:'\",.<>/?]+)\\.)+(?:ac|ad|aero|ae|af|ag|ai|al|am|an|ao|aq|arpa|ar|asia|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|biz|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|cat|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|coop|com|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|info|int|in|io|iq|ir|is|it|je|jm|jobs|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mobi|mo|mp|mq|mr|ms|mt|museum|mu|mv|mw|mx|my|mz|name|na|nc|net|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pro|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tel|tf|tg|th|tj|tk|tl|tm|tn|to|tp|travel|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|xn--0zwm56d|xn--11b5bs3a9aj6g|xn--80akhbyknj4f|xn--9t4b11yi5a|xn--deba0ad|xn--g6w251d|xn--hgbk6aj7f53bba|xn--hlcj6aya9esc7a|xn--jxalpdlp|xn--kgbechtv|xn--zckzah|ye|yt|yu|za|zm|zw)|(?:(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5]))(?:\\?[^#<>\\s]*)?(?:#[^<>\\s]*)?(?!\\w))","ig"),c=new RegExp("^"+t,"i"),i={"'":"`",">":"<",")":"(","]":"[","}":"{","B;":"B+","b:":"b9"},o={callback:function(u,t){return t?'<a href="'+t+'" title="'+t+'" target="_blank">'+u+"</a>":u},punct_regexp:/(?:[!?.,:;'"]|(?:&|&amp;)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)$/},function(u,t){t=t||{};var a,s,d,r,f,A,l,F,h,m,C,w,g="",B=[];for(s in o)void 0===t[s]&&(t[s]=o[s]);for(;a=n.exec(u);)if(d=a[0],l=(A=n.lastIndex)-d.length,!/[\/:]/.test(u.charAt(l-1))){do{F=d,w=d.substr(-1),(C=i[w])&&(h=d.match(new RegExp("\\"+C+"(?!$)","g")),m=d.match(new RegExp("\\"+w,"g")),(h?h.length:0)<(m?m.length:0)&&(d=d.substr(0,d.length-1),A--)),t.punct_regexp&&(d=d.replace(t.punct_regexp,function(u){return A-=u.length,""}))}while(d.length&&d!==F);r=d,c.test(r)||(r=(-1!==r.indexOf("@")?r.indexOf(e)?e:"":r.indexOf("irc.")?r.indexOf("ftp.")?"http://":"ftp://":"irc://")+r),f!=l&&(B.push([u.slice(f,l)]),f=A),B.push([d,r])}for(B.push([u.substr(f)]),s=0;s<B.length;s++)g+=t.callback.apply(window,B[s]);return g||u}),r.find("a").length||(r.find(".emoji").each(function(){u(this).replaceWith(u(this).attr("alt"))}),f=" "+r.html(),f=ctfLinkify(f));f.length>0&&(f=(f=f.replace(/<br>/g,"<br> ")).replace(/(^|\s)#(\w*[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]+\w*)/gi,function(u){var t=u.trim();return/^#[0-9A-F]{6}$/i.test(t)?t:' <a href="https://twitter.com/hashtag/'+t.substring(1)+'" target="_blank" rel="nofollow noopener">'+t+"</a>"}));f=f.replace(/[\s][@]+[A-Za-z0-9-_]+/g,function(u){var t=u.trim();return' <a href="https://twitter.com/'+t.substring(1)+'" target="_blank" rel="nofollow noopener">'+t+"</a>"}),r.html(f.trim()),r.append(d),r.find("a").css("color","#"+l),d.css("color","#"+l)}s.find(".ctf-tweet-text a").each(function(){jQuery(this).text().indexOf("http")>-1&&jQuery(this).text().length>63&&jQuery(this).text(jQuery(this).text().substring(0,60)+"...")})}),a.find(".ctf-author-name, .ctf-tweet-date, .ctf-author-screenname, .ctf-twitterlink, .ctf-author-box-link, .ctf-retweet-text, .ctf-quoted-tweet").css("color",a.find(".ctf-tweet-text").css("color")),a.find(".ctf_more").off("click").on("click",function(t){t.preventDefault(),u(this).hide().next(".ctf_remaining").show()}),"function"==typeof ctf_custom_js&&ctf_custom_js(u),a.find(".ctf-author-box-link p:empty").remove()}function d(u,t,e,n,a,c){n.addClass("ctf-loading").append('<div class="ctf-loader"></div>'),n.find(".ctf-loader").css("background-color",n.css("color"));var o=(e.attr("data-feed-id"),e.attr("data-feed-id")),d=(e.attr("data-postid"),e.attr("data-postid"));jQuery.ajax({url:ctf.ajax_url,type:"post",data:{action:"ctf_get_more_posts",last_id_data:u,shortcode_data:t,num_needed:a,persistent_index:c,feed_id:o,location:i(e),post_id:d},success:function(t){""!==u?(-1==t.indexOf("<meta charset")&&e.find(".ctf-item").removeClass("ctf-new").last().after(t),e.find(".ctf-out-of-tweets").length&&(n.hide(),e.find(".ctf-out-of-tweets p").eq(0).fadeIn().end().eq(1).delay(500).fadeIn())):e.find(".ctf-tweets").append(t),n.removeClass("ctf-loading").find(".ctf-loader").remove(),s(e)}})}u(".ctf").length<=u(".ctf_is_initialized").length||(window.ctfObject.consentGiven&&c(),u(".ctf").each(function(){var a=u(this),c=parseInt(a.attr("data-ctfneeded"));a.width()<=480&&a.addClass("ctf-narrow"),a.width()<=320&&a.addClass("ctf-super-narrow"),u(this).hasClass("ctf_is_initialized")||s(a),setTimeout(function(){if(c>0){var u=a.find(".ctf-more"),t=a.find(".ctf-item").last().attr("id"),e=a.find(".ctf-item").length;d(t,a.attr("data-ctfshortcode"),a,u,c,e)}},500),a.find(".ctf-more").on("click",function(){var t=u(this),e=a.find(".ctf-item").last().attr("id"),n=a.find(".ctf-item").length;d(e,a.attr("data-ctfshortcode"),a,t,0,n)}),a.find(".ctf-author-box-link p:empty").remove(),setTimeout(function(){t()?n(a):e(a)},500)}))},jQuery(document).ready(function(u){ctf_init(),u("#cookie-notice a").on("click",function(){setTimeout(function(){a()},1e3)}),u("#cookie-law-info-bar a").on("click",function(){setTimeout(function(){a()},1e3)}),u(".cli-user-preference-checkbox").on("click",function(){a()}),u(window).on("CookiebotOnAccept",function(u){a()}),u(document).on("cmplzEnableScripts",function(t){"marketing"===t.detail&&u(".ctf").each(function(){window.ctfObject.consentGiven=!0,a()})}),u(document).on("cmplzFireCategories",function(t){"marketing"===t.detail.category&&u(".ctf").each(function(){window.ctfObject.consentGiven=!0,a()})}),u(document).on("borlabs-cookie-consent-saved",function(u){a()})})}(jQuery);