Changeset 3475865
- Timestamp:
- 03/05/2026 07:10:10 PM (3 weeks ago)
- Location:
- advanced-iframe/trunk
- Files:
-
- 16 edited
-
advanced-iframe-admin-page.php (modified) (1 diff)
-
advanced-iframe.php (modified) (5 diffs)
-
css/ai.css (modified) (2 diffs)
-
includes/advanced-iframe-admin-default.php (modified) (3 diffs)
-
includes/advanced-iframe-admin-external-workaround.php (modified) (2 diffs)
-
includes/advanced-iframe-admin-parameters.php (modified) (2 diffs)
-
includes/advanced-iframe-admin-resize.php (modified) (1 diff)
-
includes/advanced-iframe-admin-zoom.php (modified) (1 diff)
-
includes/advanced-iframe-main-css.php (modified) (1 diff)
-
includes/advanced-iframe-main-helper.php (modified) (1 diff)
-
includes/advanced-iframe-main-iframe.php (modified) (2 diffs)
-
includes/advanced-iframe-main-prepare.php (modified) (4 diffs)
-
includes/advanced-iframe-main-read-config.php (modified) (4 diffs)
-
js/ai.js (modified) (6 diffs)
-
js/ai.min.js (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
advanced-iframe/trunk/advanced-iframe-admin-page.php
r3390747 r3475865 249 249 $text = balanceTags($text, true); 250 250 $devOptions[$item] = stripslashes($text); 251 } elseif ($item === 'id') { 252 $newtext = preg_replace("/\W/", "_", $text); 253 // remove trailing numbers 254 $newtext = preg_replace('/^\d+/', '', $newtext); 255 if (!empty($newtext)) { 256 $devOptions[$item] = $newtext; 257 } 251 258 } elseif (function_exists('sanitize_text_field')) { 252 259 $devOptions[$item] = stripslashes(sanitize_text_field($text)); 253 260 } else { 254 261 $devOptions[$item] = stripslashes($text); 255 }256 if ($item === 'id') {257 $devOptions[$item] = preg_replace("/\W/", "_", $text);258 // remove trailing numbers259 $devOptions[$item] = preg_replace('/^\d+/', '', $devOptions[$item]);260 262 } 261 263 -
advanced-iframe/trunk/advanced-iframe.php
r3419098 r3475865 3 3 Plugin Name: Advanced iFrame 4 4 Plugin URI: https://wordpress.org/plugins/advanced-iframe/ 5 Version: 2025.10 5 Version: 2026.0 6 Requires at least: 5.5 7 Requires PHP: 7.4 6 8 Text Domain: advanced-iframe 7 9 Domain Path: /languages … … 34 36 // error_reporting(E_ALL); 35 37 36 $aiVersion = '202 5.10';38 $aiVersion = '2026.0'; 37 39 // check $aiJsSize 38 40 … … 971 973 function createMinimizedAiJs($backend) { 972 974 global $aiVersion; 973 $aiJsSize = 8 7421;975 $aiJsSize = 88293; 974 976 $newContent = file_get_contents(dirname(__FILE__) . '/js/ai.js'); 975 977 $oldFileName = dirname(__FILE__) . '/js/ai.min.js'; … … 1390 1392 } 1391 1393 1392 // The function that handles the AJAX request 1394 /** 1395 * Public AJAX endpoint intentionally exposed to unauthenticated users. 1396 * Used exclusively for creating a temporary FIFO cache. 1397 * No user data or privileged operations performed. 1398 * Cache is only active if the feature "Add iframe URL as param" with hash/hashrewrite is enabled. 1399 * The cache size is reported in the administration so the owner can check, if it is full. 1400 */ 1393 1401 function aip_map_url_callback() { 1394 1402 check_ajax_referer('aip-parameter-nonce', 'security'); 1395 $url = urldecode($_POST['url']); 1403 1404 // check if feature is active 1405 $options = get_option($this->adminOptionsName); 1406 $hashShortCodeActive = $options['add_iframe_url_as_param_prefix'] == "hash" || 1407 $options['add_iframe_url_as_param_prefix'] == "hashrewrite"; 1408 1409 if (!$hashShortCodeActive) { 1410 echo "Request_not_valid"; 1411 die(); 1412 } 1413 1414 $url = urldecode($_POST['url']); 1396 1415 if (filter_var($url, FILTER_VALIDATE_URL) === FALSE) { 1397 echo " URL_NOT_VALID";1416 echo "Request_not_valid"; 1398 1417 die(); 1399 1418 } … … 1402 1421 if (!empty($paramData)) { 1403 1422 if(count($paramData) > 1000) { 1404 echo "TOO_MANY_CACHE_ENTRIES";1405 die();1423 // Remove first cache element so we have a FIFO cache with a max size of 1000 1424 array_shift($paramData); 1406 1425 } 1407 1426 $nextid = 1; -
advanced-iframe/trunk/css/ai.css
r3390747 r3475865 792 792 793 793 #ai .optin-message { 794 height: 250px;794 height: 40px; 795 795 animation: shrinkHeight 0.5s ease forwards; 796 796 animation-delay: 3s; … … 800 800 @keyframes shrinkHeight { 801 801 from { 802 height: 250px;802 height: 40px; 803 803 } 804 804 to { 805 height: 60px;805 height: 40px; 806 806 } 807 807 } -
advanced-iframe/trunk/includes/advanced-iframe-admin-default.php
r3345675 r3475865 72 72 foreach ($ovars as $key => $value) { 73 73 if (!is_object($value) && !is_array($value)) { 74 $userinfo_html .= $key . " => " . $value. "<br>";74 $userinfo_html .= esc_html($key) . " => " . esc_html($value) . "<br>"; 75 75 } 76 76 } … … 83 83 foreach ($all_meta_for_user as $key => $value) { 84 84 if (!is_object($value) && !is_array($value)) { 85 $usermeta_html .= $key . " => " . $value. "<br>";85 $usermeta_html .= esc_html($key) . " => " . esc_html($value) . "<br>"; 86 86 } 87 87 } … … 130 130 } 131 131 printTextInput(false, $devOptions, __('Style', 'advanced-iframe'), 'style', __('You can define styles for the iframe if you like. The recommended way is to put the styles in a css file and use the class option. With the button below the width, height, content_id, content_styles, hide_content_until_iframe_color and the needed styles above for a fullscreen iframe are set. Also check the settings at the height where you can do calculations to add fixed headers/footers. Shortcode attribute: style=""' . $style_fs, 'advanced-iframe')); 132 printTextInput(false, $devOptions, __('Id', 'advanced-iframe'), 'id', __('Enter the \'id\' attribute of the iframe. Allowed values are only a-zA-Z0-9_. Ids cannot start with a number!!! Do NOT use any other characters because the id is also used to generate unique javascript functions! Other characters will be removed when you save! If a src directly in a shortcode is set and no id than an id is generated automatically if several iframes are on one page to avoid configuration problems. Shortcode attribute: id=""', 'advanced-iframe'));132 printTextInput(false, $devOptions, __('Id', 'advanced-iframe'), 'id', __('Enter the \'id\' attribute of the iframe. Allowed values are only a-zA-Z0-9_. Ids cannot start with a number!!! This settings is mandatory. If the sanitized value is invalid the old value is used. Do NOT use any other characters because the id is also used to generate unique javascript functions! Other characters will be removed when you save! If a src directly in a shortcode is set and no id than an id is generated automatically if several iframes are on one page to avoid configuration problems. Shortcode attribute: id=""', 'advanced-iframe')); 133 133 printTextInput(false, $devOptions, __('Name', 'advanced-iframe'), 'name', __('Enter the \'name\' attribute of the iframe. Shortcode attribute: name=""', 'advanced-iframe')); 134 134 printTrueFalse(false, $devOptions, __('Allow full screen', 'advanced-iframe'), 'allowfullscreen', __('allowfullscreen is an HTML attribute that enables videos to be displayed in fullscreen mode. Currently this is a new html attribute not supported by all browsers. So please check all of the browsers you want to support. Shortcode attribute: allowfullscreen="true" or allowfullscreen="false"', 'advanced-iframe')); -
advanced-iframe/trunk/includes/advanced-iframe-admin-external-workaround.php
r3344404 r3475865 185 185 if ($evanto || $isDemo) { 186 186 printTrueFalse(true, $devOptions, __('Support WP multisite', 'advanced-iframe'), 'multi_domain_enabled', __('This is only supported if you select "Use postMessage for communication" to "yes" or "debug". Please read the documentation at "Use postMessage for communication" how to use this setting!', 'advanced-iframe'), "false", '//www.advanced-iframe.com/advanced-iframe/advanced-iframe-pro-demo/external-workaround-with-post-message', true); 187 printTextInput(true, $devOptions, __('i-20-Include content directly from the iframe', 'advanced-iframe'), 'data_post_message', __('When you enable post communication you can read elements from the iframe and transfer it to the parent and include it there. This is like the feature "Include content directly" from the "Add files/content" from the next tab but more powerful. You can define here as many elements you like and insert it to the parent page. To enable this setting you need to specify the element of the parent and the element of the iframe separated by a |. Several settings are separated by , e.g. #c-id|#content,#s-id|#some-images,#p-id|#iframe-right p:nth-child(2). You can use any valid <a class="jquery-help-link" href="#">jQuery selector pattern</a> here! Please read the section "<a class="howto-id-link" href="#">How to find the id and the attributes</a>" to find the right id or class. Currently, the iframe is NOT hidden by default. After the setup you need to set display:none; on the basic tab at "Style". Currently, there are no additional settings like for the same domain. So make sure that e.g. the divs you want to add the content have e.g. the correct height for optimal display! This setting cannot be set by a shortcode. <a href="#mirp" class="link-id-external-ai-overview">Please see below</a> how to configure ai_external.js directly.', 'advanced-iframe'), 'text', '//www.advanced-iframe.com/advanced-iframe/advanced-iframe-pro-demo/external-workaround-with-post-message#e52', true); 187 printTextInput(true, $devOptions, __('i-20-Include content directly from the iframe', 'advanced-iframe'), 'data_post_message', __('When you enable post communication you can read elements from the iframe and transfer it to the parent and include it there. This is like the feature "Include content directly" from the "Add files/content" from the next tab but more powerful. You can define here as many elements you like and insert it to the parent page. To enable this setting you need to specify the element of the parent and the element of the iframe separated by a |. Several settings are separated by , e.g. #c-id|#content,#s-id|#some-images,#p-id|#iframe-right p:nth-child(2). You can use any valid <a class="jquery-help-link" href="#">jQuery selector pattern</a> here! Please read the section "<a class="howto-id-link" href="#">How to find the id and the attributes</a>" to find the right id or class. Currently, the iframe is NOT hidden by default. After the setup you need to set display:none; on the basic tab at "Style". Currently, there are no additional settings like for the same domain. So make sure that e.g. the divs you want to add the content have e.g. the correct height for optimal display! <br><strong>Important</strong>: For security reasons, you must configure this feature in both ai_external.js and the plugin starting with version 2026.0. You can do this by configuring everything here, or by setting it in the shortcode with data_post_message="". AND configuring it with <a href="#mirp" class="link-id-external-ai-overview">dataPostMessage</a>. The plugin removes <script> tags from HTML content to help prevent XSS (Cross-Site Scripting) attacks.', 'advanced-iframe'), 'text', '//www.advanced-iframe.com/advanced-iframe/advanced-iframe-pro-demo/external-workaround-with-post-message#e52', true); 188 188 189 printTextInput(true, $devOptions, __('Scroll to top', 'advanced-iframe'), 'external_scroll_top', __('This solution is only needed if your page inside the iframe is NOT reloading the page when going from one page to the next. If you have an Ajax form no onload event is fired! This solution does send the scroll to top event to the parent if you click on any of the specified elements here! You can use any valid <a class="jquery-help-link" href="#">jQuery selector pattern</a> here! Please read the section "<a class="howto-id-link" href="#">How to find the id and the attributes</a>" to find the right id or class. E.g. "button" would send the on load event if you click on any HTML button element. If you like to scroll to the top of the iframe, you need to select "iframe" on the "Advanced Settings tab -> General advanced features -> Scrolls the parent window/iframe to the top". You need to use postMessage communication for this feature. This setting cannot be set by a shortcode. <a href="#mirp" class="link-id-external-ai-overview">Please see below</a> how to configure ai_external.js directly.', 'advanced-iframe'), 'text', '//www.advanced-iframe.com/advanced-iframe/advanced-iframe-pro-demo/external-workaround-with-post-message#e51', true); 189 190 } … … 254 255 <li>usePostMessage - Enable/disable the usage of postMessage for communication. See above. Valid values are true, false.</li> 255 256 <li>debugPostMessage - Enable/disable the debug of postMessage for communication. See above. Valid values are true, false.</li> 256 <li>dataPostMessage - Defines the elements that should be transfered to the client. See above. </li>257 <li>dataPostMessage - Defines the elements that should be transfered to the client. Needs to be also set as shortcode because of security reasons OR fully in the administration. See above. </li> 257 258 <li>scroll_to_top - Defines the elements where a scroll to top event is sent back to the parent. See above.</li> 258 259 ', 'advanced-iframe'); -
advanced-iframe/trunk/includes/advanced-iframe-admin-parameters.php
r3329909 r3475865 10 10 if ($evanto || $isDemo) { 11 11 printTextInput(true, $devOptions, __('Map parameter to url/ Use parameter value as iframe url', 'advanced-iframe'), 'map_parameter_to_url', __('You can map an url parameter value pair to an url or pass the url directly which should be opened in the iframe. If you e.g. have a page with the iframe, and you like to have different content in the iframe depending on an url parameter than this is the setting you have to use. You have to specify this setting in the following syntax "parameter|value|url" e.g. "show|1|https://www.advanced-iframe.com". If you than open the parent page with ?show=1 than https://www.advanced-iframe.com is opened inside the iframe. You can also specify several mappings by separating them by \',\'.<br />GET and POST parameters are supported!<br />You can also only specify 1 parameter here! The value of this parameter is than used as iframe url. e.g. show=https%3A%2F%2Fwww.tinywebgallery.com%3Fparam=value. You need to encode the url if you pass it in the url. Especially ? (%3F) and & (%26)! Please note that because of security reason only whitelisted chars [a-zA-Z0-9/:?&.] are allowed. Encoded parameters in the urls are not supported because all input is decoded and checked. If you add :sameDomain, then no urls with http/s are not used as iframe URL! e.g. show::sameDomain. See the next setting how to update this url dynamically. If no parameter/value pair does match the normal src attribute of the configuration is used. Shortcode attribute: map_parameter_to_url=""', 'advanced-iframe')); 12 printSameRemote($devOptions, __('i-20-Add iframe URL as param', 'advanced-iframe'), 'add_iframe_url_as_param', __('With this setting the URL of the iframe is added as parameter to the current URL. The parameter can be defined in the setting before. If this is not set the default "iframe" is used (be aware of <a href="https://codex.wordpress.org/Reserved_Terms" target="_blank">reserved words</a>!). This feature is only enabled for the remote domain if you also enable auto height for remote domains because the URL of the iframe is sent with the same request. This enables bookmarkable URLs where you go directly to the last page in the iframe. The history api which enables the change of the URL is only supported by modern browsers. For older browsers the URL is simply not changed. See https://caniuse.com/?search=pushstate. Shortcode attribute: add_iframe_url_as_param="same", add_iframe_url_as_param="remote" or add_iframe_url_as_param="false"', 'advanced-iframe'), '//www.advanced-iframe.com/advanced-iframe/advanced-iframe-pro-demo/add-iframe-url-to-parent', true);12 printSameRemote($devOptions, __('i-20-Add iframe URL as param', 'advanced-iframe'), 'add_iframe_url_as_param', __('With this setting the URL of the iframe is added as parameter to the current URL. The parameter can be defined in the setting before. If this is not set the default "iframe" is used (be aware of <a href="https://codex.wordpress.org/Reserved_Terms" target="_blank">reserved words</a>!). This feature is only enabled for the remote domain if you also enable auto height for remote domains because the URL of the iframe is sent with the same request. This enables bookmarkable URLs where you go directly to the last page in the iframe. Shortcode attribute: add_iframe_url_as_param="same", add_iframe_url_as_param="false". If you use the shortcode add_iframe_url_as_param="remote", you also need to set this before ai_external.js like shown in the demo.', 'advanced-iframe'), '//www.advanced-iframe.com/advanced-iframe/advanced-iframe-pro-demo/add-iframe-url-to-parent', true); 13 13 14 14 printTrueFalse(true, $devOptions, __('i-40-Add params directly', 'advanced-iframe'), 'add_iframe_url_as_param_direct', __('Enabling this does not add the full iframe URL but only the parameters of the iframe. You need also to configure either "URL forward parameters" or use URL placeholders (see basic tab). This works on the <a target="_blank" href="//www.advanced-iframe.com/advanced-iframe/advanced-iframe-pro-demo/add-iframe-params-to-parent">same</a> and for <a target="_blank" href="//www.advanced-iframe.com/advanced-iframe/advanced-iframe-pro-demo/add-iframe-params-to-parent-remote">remote</a> domains. Please go there for a detailed description. Shortcode attribute: add_iframe_url_as_param_direct="true" or add_iframe_url_as_param_direct="false" ', 'advanced-iframe'), 'false', '//www.advanced-iframe.com/advanced-iframe/advanced-iframe-pro-demo/add-iframe-params-to-parent', false); 15 15 16 $c leanHashButton = 'Delete the hash/URL cache by clicking <a class="confirmation-hash post" href="admin.php?page=advanced-iframe&remove-url-hash-cache=true">here</a>. Deleting the cache can be useful during setup and if you have changed URLs. It should NOT be done afterwards if defaults ids are used for the URLs as they are generated in order and already bookmarked URLs might change.';16 $cacheSize = count(get_option("advancediFrameParameterData", [])); 17 17 18 printTextInput(true, $devOptions, __('i-40-Prefix/id/urlrewrite for iframe URL', 'advanced-iframe'), 'add_iframe_url_as_param_prefix', __('With this setting you can define a prefix which all (most) of your pages in the iframe have. This prefix is than not added to the URL but added internally. This does reduce the length of the parameter value. The prefix has to be without http:// or https://. So a prefix could be www.advanced-iframe.com/demos/. If your pages are e.g. at www.advanced-iframe.com/demos/example1.htm and www.advanced-iframe.com/demos/example2.htm than the page parameter is only page=example2.htm and not page=www.advanced-iframe.com%2Fdemos%2Fexample2.htm.<br> <br>Additionally, this setting has 2 special keywords: "hash" and "hashrewrite". If you enter "hash" then the URL is stored in the database and only an id is used. So the URL is extended by e.g. ?iframe=4. "hashrewrite" additionally does a URL rewrite. So the URL is extended by /iframe/4. The parameter is set at "Map parameter to URL" and is "iframe" by default. IMPORTANT: if you want to use "hashrewrite" you need to set this and "Map parameter to URL" here as well (and in the shortcode) because in the shortcode alone it is loaded too late! As other plugins also can rewrite the URL please check if they are compatible! First use "hash" and then try "hashrewrite"! "hashrewrite" is only possible if you do not use "plain" as "Permalink Settings" (pagename is the one tested the most!). Also it takes a little bit until the id is read from the database. So the URL is changed with a small delay! See the demos for a working examples.</p><p class="description"><strong>With "hashrewrite" are many individual optimizations possible</strong> which depend on the parent and iframe url. Like attaching a specific unique parameter from the iframe url to the parent and load the full url based on this. Please contact the <a href="https://www.advanced-iframe.com/advanced-iframe/advanced-iframe-support" target="_blank">support</a> for an individual solution.</p><p class="description">Shortcode attribute: add_iframe_url_as_param_prefix=""', 'advanced-iframe') . $cleanHashButton, 'text', '//www.advanced-iframe.com/advanced-iframe/advanced-iframe-pro-demo/add-iframe-url-to-parent', false); 18 $currentCacheSize = '<p class="description">Number of cache entries: <strong>'.$cacheSize.'/1000</strong>. Please note that the cache is filled by your users, bots and in the worst case even by hackers because the cache needs to be public! The cache is only active if the hash feature is active. Each of your pages is one cache entry and if it is full, the oldest one will be removed. Please monitor the cache when you enable this feature. If the cache size seems unrealistic I recommend not to use it! Invalid entries are not doing any harm but filling your cache. A full cache will cause that old bookmarks are not working anymore!</p>'; 19 20 $cleanHashButton = $currentCacheSize .'<p class="description">Delete the hash/URL cache by clicking <a class="confirmation-hash post" href="admin.php?page=advanced-iframe&remove-url-hash-cache=true">here</a>. Deleting the cache can be useful during setup and if you have changed URLs. It should NOT be done afterwards if defaults ids are used for the URLs as they are generated in order and already bookmarked URLs might change.</p>'; 21 22 printTextInput(true, $devOptions, __('i-40-Prefix/id/urlrewrite for iframe URL', 'advanced-iframe'), 'add_iframe_url_as_param_prefix', __('With this setting you can define a prefix which all (most) of your pages in the iframe have. This prefix is than not added to the URL but added internally. This does reduce the length of the parameter value. The prefix has to be without http:// or https://. So a prefix could be www.advanced-iframe.com/demos/. If your pages are e.g. at www.advanced-iframe.com/demos/example1.htm and www.advanced-iframe.com/demos/example2.htm than the page parameter is only page=example2.htm and not page=www.advanced-iframe.com%2Fdemos%2Fexample2.htm.<br> <br>Additionally, this setting has 2 special keywords: "hash" and "hashrewrite". If you enter "hash" then the URL is stored in the database and only an id is used. So the URL is extended by e.g. ?iframe=4. "hashrewrite" additionally does a URL rewrite. So the URL is extended by /iframe/4. The parameter is set at "Map parameter to URL" and is "iframe" by default. IMPORTANT: if you want to use "hash" or "hashrewrite" you need to set this and "Map parameter to URL" here <strong>AND</strong> in the shortcode, because in the shortcode alone it is loaded too late! As other plugins also can rewrite the URL please check if they are compatible! First use "hash" and then try "hashrewrite"! "hashrewrite" is only possible if you do not use "plain" as "Permalink Settings" (pagename is the one tested the most!). Also it takes a little bit until the id is read from the database. So the URL is changed with a small delay! See the demos for a working examples.</p><p class="description"><strong>With "hashrewrite" are many individual optimizations possible</strong> which depend on the parent and iframe url. Like attaching a specific unique parameter from the iframe url to the parent and load the full url based on this. Please contact the <a href="https://www.advanced-iframe.com/advanced-iframe/advanced-iframe-support" target="_blank">support</a> for an individual solution.</p>'. $cleanHashButton .'<p class="description">Shortcode attribute: add_iframe_url_as_param_prefix=""', 'advanced-iframe'), 'text', '//www.advanced-iframe.com/advanced-iframe/advanced-iframe-pro-demo/add-iframe-url-to-parent', false); 19 23 20 24 /* … … 25 29 */ 26 30 27 printSameRemote($devOptions, __('Use the iframe title for the parent', 'advanced-iframe'), 'use_iframe_title_for_parent', __('Enabling this does set the title of the iframe on the parent page once available. This feature works on the same and the remote domain. The original title is shown until the new one is loaded. The original title cannot be hidden as this would be a global setting and also affecting all pages of a website. Shortcode attribute: use_iframe_title_for_parent="same". For the external workaround you need to set it to "Remote Domain" or use use_iframe_title_for_parent="remote" in the ai_external.js settings.', 'advanced-iframe'), '//www.advanced-iframe.com/advanced-iframe/advanced-iframe-pro-demo/add-iframe-url-to-parent', true);31 printSameRemote($devOptions, __('Use the iframe title for the parent', 'advanced-iframe'), 'use_iframe_title_for_parent', __('Enabling this does set the title of the iframe on the parent page once available. This feature works on the same and the remote domain. The original title is shown until the new one is loaded. The original title cannot be hidden as this would be a global setting and also affecting all pages of a website. Shortcode attribute: use_iframe_title_for_parent="same". For the external workaround you need to set it to "Remote Domain" or set use_iframe_title_for_parent="remote" AND use_iframe_title_for_parent="remote" in the ai_external.js settings. Since 2026.0 the shortcode setting is mandatory if you configure ai_external.js because of security reasons.', 'advanced-iframe'), 'https://www.advanced-iframe.com/advanced-iframe/advanced-iframe-pro-demo/add-iframe-url-to-parent/add-iframe-url-as-param-remote-domain', true); 28 32 29 33 } -
advanced-iframe/trunk/includes/advanced-iframe-admin-resize.php
r3329909 r3475865 22 22 23 23 printHeightTrueFalse($devOptions, __('i-20-Store height in cookie', 'advanced-iframe'), 'store_height_in_cookie', __('If you enable the dynamic resize the value is calculated each time when the page is loaded. So each time it took a little time until the resize of the iframe is done. And this is visible sometimes if the content page loads very slow or is on a different domain or depends on the browser. By enabling this option the last calculated height is stored in a cookie and available right away. The iframe is first resized to this height and later on when the new height comes it is updated. By default, this is disabled because when you have dynamic content in the iframe it is possible that the iframe does not shrink. So please try this setting with your destination page. <strong>If you use several iframes on one page please don\'t use this because currently only one cookie per page is supported. Also, you cannot use this feature if you include the ai.js file at the bottom. If you use iframe on different pages different id are needed because the id is part of the cookie</strong>. Shortcode attribute: store_height_in_cookie="true" or store_height_in_cookie="false" ', 'advanced-iframe')); 24 printHeightNumberInput(false, $devOptions, __('i-20-Additional height', 'advanced-iframe'), 'additional_height', __('If you like that the iframe is higher than the calculated value you can add some extra height here. This number is then added to the calculated one. This is e.g. needed if one of your tested browsers displays a scrollbar because of 1 or 2 pixel. Or you have an invisible area that is shown by the click on a button that can increase the size of the page. This option is NOT possible when "Store height in cookie" is enabled because this would cause that the height will increase at each reload of the parent page. If you use several iframes please use the same setting for all of them because there is only one global variable. Shortcode attribute: additional_height=""', 'advanced-iframe'));24 printHeightNumberInput(false, $devOptions, __('i-20-Additional height', 'advanced-iframe'), 'additional_height', __('If you like that the iframe is higher than the calculated value you can add some extra height here. This number is then added to the calculated one. This is e.g. needed if one of your tested browsers displays a scrollbar because of 1 or 2 pixel. Or you have an invisible area that is shown by the click on a button that can increase the size of the page. This option is NOT possible when "Store height in cookie" is enabled because this would cause that the height will increase at each reload of the parent page. If you use several iframes please use the same setting for all of them because there is only one global variable. Shortcode attribute: additional_height=""', 'advanced-iframe')); 25 25 printTrueFalse(false, $devOptions, __('i-20-Resize iframe to content width', 'advanced-iframe'), 'onload_resize_width', __('If you like that the iframe is resized to the width of the content you should set this to \'Yes\'. PLEASE NOTE: Normally this is NOT what you want. Most people like a width of 100%! If you have a responsive layout this setting should be false. If your iframe has only a width of 1px disable the feature! Please note that this is done by Javascript and only in combination with resizing the content height! So if a user has Javascript deactivated or a not supported browser the iframe does not get resized. This setting generates the code onload="aiResizeIframe(this, \'true\');" to the iframe. Shortcode attribute: onload_resize_width="true" or onload_resize_width="false" ', 'advanced-iframe')); 26 26 if (!$evanto) { -
advanced-iframe/trunk/includes/advanced-iframe-admin-zoom.php
r3329909 r3475865 8 8 _e('All major browsers do support the zoom of iframes. Depending on your setup you can use a static zoom factor or even automatic zoom which does zoom the content depending on the available space. Please check the examples how the different zoom settings do work. Please note that the zoom below does only zoom the iframe. When you use the "Show only a part of the iframe" the inner content is zoomed. For zoom options of the viewport please check the settings at "Show only a part of the iframe"', 'advanced-iframe'); 9 9 echo '</p><table class="form-table">'; 10 printNumberInput(true, $devOptions, __('Zoom iframe', 'advanced-iframe'), 'iframe_zoom', __('You can zoom the content of the iframe with this setting. E.g. entering 0.5 does resize the iframe to 50%. At the iframe width and height you need to enter the FULL size of the iframe. So if you enter width = 1000, height = 500 and zoom = 0.5 than the result will be 500x250. The following browsers are supported: IE8-11, Firefox, Chrome, Safari, Opera, Edge. Older versions of IE are not supported. Please test all the browsers you want to support with your page because not all pages do look good in a zoomed mode!"Show only a part of an iframe" and "Resize iframe to content height" are supported. Shortcode attribute: iframe_zoom=""', 'advanced-iframe'), 'text', '', '//www.advanced-iframe.com/advanced-iframe/advanced-iframe-pro-demo/zoom-iframe-content');10 printNumberInput(true, $devOptions, __('Zoom iframe', 'advanced-iframe'), 'iframe_zoom', __('You can zoom the content of the iframe with this setting. E.g. entering 0.5 does resize the iframe to 50%. At the iframe width and height you need to enter the FULL size of the iframe. So if you enter width = 1000, height = 500 and zoom = 0.5 than the result will be 500x250. "Show only a part of an iframe" and "Resize iframe to content height" are supported. Shortcode attribute: iframe_zoom=""', 'advanced-iframe'), 'text', '', '//www.advanced-iframe.com/advanced-iframe/advanced-iframe-pro-demo/zoom-iframe-content'); 11 11 printTrueFalse(true, $devOptions, __('i-20-Zoom absolute fix', 'advanced-iframe'), 'use_zoom_absolute_fix', __('Sometimes the zoom measurements need an additional position:absolute to work correctly. Only set this to true if the zooms does not work as expected. Shortcode attribute: use_zoom_absolute_fix="true" or use_zoom_absolute_fix="false"', 'advanced-iframe')); 12 12 printSameRemote($devOptions, __('Auto zoom iframe', 'advanced-iframe'), 'auto_zoom', __('This feature does automatically calculates the needed zoom factor to fit the iframe page into the parent page. Especially when you have a responsive website but the remote website is not responsive this is the only way that the page in the iframe does also zoom. Many smartphones and tablets to automatically zoom the parent page but not the iframe page. So there this feature can also be used. This feature works on the same domain and if you are able to use the external workaround and use auto height there (otherwise the width does not get transferred). Shortcode attribute: auto_zoom="same", auto_zoom="remote" or auto_zoom="false" ', 'advanced-iframe'), '//www.advanced-iframe.com/advanced-iframe/advanced-iframe-pro-demo/auto-zoom-iframe-content', true); -
advanced-iframe/trunk/includes/advanced-iframe-main-css.php
r3329909 r3475865 279 279 line-height: 1.2; 280 280 font-size: 90%; 281 z-index: 999999;}'; 281 z-index: 999999; 282 background-image: none !important; 283 background: none !important; 284 }'; 282 285 } 283 286 -
advanced-iframe/trunk/includes/advanced-iframe-main-helper.php
r3390747 r3475865 495 495 } 496 496 497 static $replaceBasicXSS = array('"', "'", ' ', '(', ')', ';', '}'); 497 static function filterXSSNumber($value) { 498 return preg_match('/^\d+(?:[;,]\d+)*$/', $value) ? $value : 0; 499 } 500 501 static $replaceBasicXSS = array('"', "'", ' ', '(', ')', ';', '}', 'onerror'); 498 502 499 503 static function filterBasicXSS($value) { -
advanced-iframe/trunk/includes/advanced-iframe-main-iframe.php
r3390747 r3475865 134 134 if ($num_values === 7 || $num_values === 8) { 135 135 $display_type = 'a'; 136 $hrefValue = esc_ html(trim($values[6]));136 $hrefValue = esc_url(trim($values[6])); 137 137 if ($hrefValue === 'changeViewport') { 138 138 $hide_href = ' href="javascript:setNewViewPort' . $id . '(0); "'; … … 370 370 // html5 style to support vw and vh and we only add it if not present. 371 371 if (strpos($style, 'height:') === false) { 372 $style .= ' height:' . esc_html(trim($this->addPx($height))) . ';';372 $style .= ';height:' . esc_html(trim($this->addPx($height))) . ';'; 373 373 } 374 374 } -
advanced-iframe/trunk/includes/advanced-iframe-main-prepare.php
r3329909 r3475865 18 18 } 19 19 20 static function aiPreparePostMessageJs($html_js, $id, $use_post_message, $src, $multi_domain_enabled) { 20 static function aiPreparePostMessageJs($html_js, $id, $use_post_message, $src, $multi_domain_enabled, 21 $data_post_message,$add_iframe_url_as_param,$use_iframe_title_for_parent) { 21 22 if ($use_post_message != 'false') { 22 23 $iframe_origin_full = $src; … … 67 68 $html_js .= 'event = aiConvertPostMessage(event);'; 68 69 } 69 $html_js .= ' aiProcessMessage(event,"' . $id . '", "' . $use_post_message . '");'; 70 71 72 $html_js .= ' aiProcessMessage(event,"' . $id . '", "' . $use_post_message . '","' .$data_post_message .'","' .$add_iframe_url_as_param .'","' .$use_iframe_title_for_parent .'");'; 70 73 $html_js .= '}'; 71 74 $html_js .= 'if (window.addEventListener) {'; … … 92 95 } 93 96 94 if ( $additional_height != 0) {97 if (!empty($additional_height)) { 95 98 $html_js .= 'var aiExtraSpace=' . esc_html($additional_height) . ';'; 96 99 } … … 531 534 } 532 535 $html_js = AdvancediFramePrepareJs::aiPrepareGlobalJsVariables($id, $include_scripts_in_content, $aiPath, $add_document_domain, $document_domain); 533 $html_js = AdvancediFramePrepareJs::aiPreparePostMessageJs($html_js, $id, $use_post_message, $src, $multi_domain_enabled); 536 $html_js = AdvancediFramePrepareJs::aiPreparePostMessageJs($html_js, $id, $use_post_message, $src, $multi_domain_enabled, 537 $data_post_message, $add_iframe_url_as_param, $use_iframe_title_for_parent); 534 538 $html_js = AdvancediFramePrepareJs::aiPrepareAiJsVariables($html_js, $iframe_zoom, $show_part_of_iframe_zoom, 535 539 $store_height_in_cookie, $id, $onload_scroll_top, $additional_height, $debug_js, $fullscreen_button_full); -
advanced-iframe/trunk/includes/advanced-iframe-main-read-config.php
r3390747 r3475865 75 75 } 76 76 77 // version isalways read.77 // Settings which are always read. 78 78 $version_counter = $options['version_counter']; 79 79 $alternative_shortcode = $options['alternative_shortcode']; 80 80 $use_post_message = $options['use_post_message']; 81 81 $multi_domain_enabled = $options['multi_domain_enabled']; 82 $data_post_message = $options['data_post_message']; 82 83 $demo = $options['demo']; 83 84 $show_support_message = $options['show_support_message']; … … 89 90 $debug_js = AdvancedIframeHelper::check_debug_enabled($options['debug_js']); 90 91 $check_shortcode = AdvancedIframeHelper::check_shortcode_enabled($options['check_shortcode']); 91 92 92 93 // defaults from main config 93 94 if ($use_shortcode_attributes_only === 'false' || $options['shortcode_attributes'] === 'false') { // … … 389 390 'referrerpolicy' => $options['referrerpolicy'], 390 391 'add_surrounding_p' => $options['add_surrounding_p'], 391 'custom' => $options['custom'] 392 'custom' => $options['custom'], 393 'data_post_message' => $options['data_post_message'] 392 394 ) 393 395 , $atts, 'advanced_iframe')); … … 702 704 $add_iframe_url_as_param_prefix = AdvancedIframeHelper::filterBasicXSS($add_iframe_url_as_param_prefix); 703 705 $map_parameter_to_url = AdvancedIframeHelper::filterBasicXSS($map_parameter_to_url); 704 $show_part_of_iframe_next_viewports = AdvancedIframeHelper::filter BasicXSS($show_part_of_iframe_next_viewports);706 $show_part_of_iframe_next_viewports = AdvancedIframeHelper::filterXSSNumber($show_part_of_iframe_next_viewports); 705 707 $enable_responsive_iframe = AdvancedIframeHelper::filterXSSTrueFalse($enable_responsive_iframe); 706 708 $show_part_of_iframe_zoom = AdvancedIframeHelper::filterXSSTrueFalse($show_part_of_iframe_zoom); 707 709 $remove_elements_from_height = AdvancedIframeHelper::filterBasicXSS($remove_elements_from_height); 708 710 $resize_on_element_resize = AdvancedIframeHelper::filterBasicXSS($resize_on_element_resize); 711 $additional_height = AdvancedIframeHelper::filterXSSNumber($additional_height); 712 $iframe_zoom = AdvancedIframeHelper::filterXSSNumber($iframe_zoom); 713 $onload_scroll_top = AdvancedIframeHelper::filterXSSTrueFalse($onload_scroll_top); 709 714 ?> -
advanced-iframe/trunk/js/ai.js
r3419098 r3475865 1 1 /** 2 * Advanced iframe functions v202 5.102 * Advanced iframe functions v2026.0 3 3 */ 4 4 /* jslint devel: true, unused: false */ … … 2060 2060 } 2061 2061 2062 function aiProcessMessage(event, id, debug) { 2062 2063 function aiProcessMessage(event, id, debug, dataPostMessage, addIframeUrlAsParam, useIframeTitleForParent) { 2063 2064 var jsObject; 2064 2065 try { … … 2089 2090 // check if the data is of the expected 2090 2091 if (type === 'height') { 2091 aiProcessHeight(jsObject );2092 aiProcessHeight(jsObject, addIframeUrlAsParam, useIframeTitleForParent); 2092 2093 } else if (type === 'show') { 2093 2094 aiProcessShow(jsObject); 2094 2095 } 2096 2097 //only configured keys! 2095 2098 for (var key in jsObject.data) { 2096 if (jsObject.data.hasOwnProperty(key) ) {2097 jQuery(key).html( jsObject.data[key]);2099 if (jsObject.data.hasOwnProperty(key) && aiIsValidKey(key, dataPostMessage)) { 2100 jQuery(key).html(aiRemoveScriptTags(jsObject.data[key])); 2098 2101 } 2099 2102 } … … 2107 2110 } 2108 2111 } 2112 } 2113 2114 /** 2115 * Checks if the key we get from the post message is in dataPostMessage saved 2116 */ 2117 function aiIsValidKey(key, dataPostMessage) { 2118 if (!dataPostMessage) return false; 2119 2120 var parts = dataPostMessage.split(','); 2121 2122 for (var i = 0; i < parts.length; i++) { 2123 var validKey = parts[i].split('|')[0].trim(); 2124 if (validKey === key) { 2125 return true; 2126 } 2127 } 2128 2129 return false; 2130 } 2131 2132 function aiRemoveScriptTags(htmlString) { 2133 const temp = jQuery('<div>').html(htmlString); 2134 temp.find('script').remove(); 2135 return temp.html(); 2109 2136 } 2110 2137 … … 2133 2160 } 2134 2161 2135 function aiProcessHeight(jsObject ) {2162 function aiProcessHeight(jsObject, addIframeUrlAsParam, useIframeTitleForParent) { 2136 2163 var nHeight = jsObject.height; 2137 2164 var nWidth = jsObject.width; … … 2141 2168 if (nHeight != null) { 2142 2169 try { 2143 var loc = jsObject.loc; 2144 if (loc != null && !loc.includes("send_console_log")) { 2145 if (typeof aiChangeUrl === "function") { 2146 aiChangeUrl(loc); 2147 } 2148 } 2149 var title = jsObject.title; 2150 if (title != null && title !== "undefined" && title !== "") { 2151 document.title = decodeURIComponent(title); 2152 } 2170 if (addIframeUrlAsParam == "remote") { 2171 var loc = jsObject.loc; 2172 if (loc != null && !loc.includes("send_console_log")) { 2173 if (typeof aiChangeUrl === "function") { 2174 aiChangeUrl(loc); 2175 } 2176 } 2177 } 2178 if (useIframeTitleForParent == "remote") { 2179 var title = jsObject.title; 2180 if (title != null && title !== "undefined" && title !== "") { 2181 document.title = decodeURIComponent(title); 2182 } 2183 } 2153 2184 if (id != null) { 2154 2185 var iHeight = parseInt(nHeight, 10); -
advanced-iframe/trunk/js/ai.min.js
r3419098 r3475865 1 /** Advanced iframe functions v202 5.10. Created: 2025-12-07 21:31:56*/2 var aiInstance,aiEnableCookie="undefined"!=typeof x&&aiEnableCookie,aiId="",aiExtraSpace=void 0===aiExtraSpace?0:aiExtraSpace,aiAccTime=0,aiRealFullscreen=void 0!==aiRealFullscreen&&aiRealFullscreen,aiInFullscreen=!1,aiOnloadEventsCounter=0,aiOverflowHtml=jQuery("html").css("overflow")??"visible",aiOverflowBody=jQuery("body").css("overflow")??"visible",aiCallbackExists=void 0!==aiReadyCallbacks&&aiReadyCallbacks instanceof Array,aiReadyCallbacks=aiCallbackExists?aiReadyCallbacks:[];function aiDebugExtended(e){"undefined"!=typeof aiShowDebug&&aiShowDebug&&console&&console.log&&console.log("Advanced iframe: "+e)}function aiResizeIframe(e,a,i){aiDebugExtended("aiResizeIframe");try{if("about:blank"===e.contentWindow.location.href)return;if(null!=e.contentWindow.document.body){var t=jQuery(window).scrollTop();e.style.marginTop="0",e.style.marginBottom="0",e.height=Number(i),e.style.height=Number(i)+"px";var o=aiGetIframeHeight(e);aiDebugExtended("aiResizeIframe - newHeight: "+o),e.height=o,e.style.height=o+"px";let r=jQuery("#ai-zoom-div-"+e.id);if(0!==r.length){var n=window["zoom_"+e.id];r.css("height",o*n)}aiEnableCookie&&0===aiExtraSpace&&aiWriteCookie(o);var l=aiGetIframeHash(e.contentWindow.location.href);if("-1"!==l){var s="#"+e.id;try{var d=jQuery(s).contents().find("#"+l);if(0!==d.length){var c=d.offset().top;t=Math.round(jQuery(s).offset().top+c)}}catch(h){}}if(setTimeout(function(){jQuery("html,body").scrollTop(t)},50),"true"===a){var f=aiGetIframeWidth(e);e.width=f,e.style.width=f+"px"}(0,window["resizeCallback"+e.id])(),null!=window.frameElement&&parent.jQuery("iframe").trigger("onload"),aiHandleAnchorLinkScrolling(e.id)}else setTimeout(function(){aiResizeIframe(e,a)},100)}catch(u){console&&console.error&&(console.error("Advanced iframe configuration error: You have enabled the resize of the iframe for pages on the same domain. But you use an iframe page on a different domain. You need to use the external workaround like described in the settings. Also check the next log. There the browser message for this error is displayed."),console.log(u))}}function aiHandleAnchorLinkScrolling(e){var a=jQuery("#"+e),i=a.offset().top;a.contents().find("body").on("click","a[href^='#']",function(){var a=jQuery(this).attr("href"),t=jQuery("#"+e).contents().find(a);if(0!==t.length){var o=t.offset().top;jQuery("html,body").scrollTop(Math.round(i+o+2))}})}function aiGetIframeHash(e){var a;return e.split("#")[1]||"-1"}function aiGetIframeHeight(e){return Math.max(e.contentWindow.document.body.scrollHeight,e.contentWindow.document.body.offsetHeight,e.contentWindow.document.documentElement.scrollHeight,e.contentWindow.document.documentElement.offsetHeight)+aiExtraSpace}function aiGetIframeWidth(e){var a=e.width;e.width=1,e.style.width="1px";var i=Math.max(e.contentWindow.document.body.scrollWidth,e.contentWindow.document.body.offsetWidth,e.contentWindow.document.documentElement.scrollWidth,e.contentWindow.document.documentElement.offsetWidth);return 1!==i?(e.width=i,e.style.width=i+"px"):(e.width=a,e.style.width=a+"px"),i}function aiGetParentIframeWidth(e){if(null!=e){let a=jQuery("#"+e.id);return 0!==a.length?a.width():-1}}function aiResizeIframeHeightById(e,a){aiDebugExtended("aiResizeIframeHeightById - id: "+e+", nHeight: "+a);try{(0,window["resizeCallback"+e])();var i=parseInt(a,10)+aiExtraSpace,t=document.getElementById(e);if(null===t&&console&&console.error){console.error("Advanced iframe configuration error: The iframe to resize could not be found. The id of the iframe and the one defined for ai_external.js ("+e+") are most likely different! Check your settings.");return}var o=jQuery(document).scrollTop();t.height=i,t.style.height=i+"px",jQuery("html,body").scrollTop(o),aiEnableCookie&&0===aiExtraSpace&&aiWriteCookie(i);var r=window["aiExecuteWorkaround_"+e];null!=r&&r()}catch(n){console&&console.error&&(console.error("Advanced iframe configuration error: The id of the parent and the external workaround are different! Check your settings."),console.log(n))}}function aiScrollToTop(e,a){if(aiDebugExtended("aiScrollToTop - id: "+e+", position: "+a),aiOnloadEventsCounter>0){var i=0;"iframe"===a&&(i=jQuery("#"+e).offset().top),setTimeout(function(){aiDebugExtended("aiScrollToTop - posTop: "+i),window.scrollTo(0,i)},100)}setTimeout(function(){aiOnloadEventsCounter++},1e3)}function aiWriteCookie(e){var a="ai-last-height";""!==aiId&&(a=a+"-"+aiId),document.cookie=a+"="+e}function aiUseCookie(){var e="ai-last-height";""!==aiId&&(e=e+"-"+aiId);for(var a=document.cookie.split(";"),i=0;i<a.length;i++){var t=a[i].split("=")[0],o=a[i].split("=")[1];if(t===e&&null!==o&&aiIsNumeric(o)){var r=document.getElementById(aiId);r.height=parseInt(o,10),r.style.height=o+"px"}}}function aiIsNumeric(e){return!isNaN(e)}function aiDisableHeight(){jQuery("#additional_height").attr("readonly","readonly").val("0")}function aiEnableHeight(){jQuery("#additional_height").removeAttr("readonly")}function aiShowElementOnly(e,a){aiDebugExtended("aiShowElementOnly");try{var i=jQuery(e).contents().find("body"),t=i.find(a).clone(!0,!0);i.find("*").not(jQuery("script")).remove(),i.prepend(t)}catch(o){console&&console.error&&(console.error("Advanced iframe configuration error: You have enabled to show only one element of the iframe for pages on the same domain. But you use an iframe page on a different domain. You need to use the pro version of the external workaround like described in the settings. Also check the next log. There the browser message for this error is displayed."),console.log(o))}}function aiCheckIfValidTarget(e,a){e||(e=window.event),e.target?i=e.target:e.srcElement&&(i=e.srcElement),3===i.nodeType&&(i=i.parentNode);for(var i,t=a.split(","),o=0;o<t.length;++o){var r=t[o].split(":");if(r[0].toLowerCase()===i.nodeName.toLowerCase()&&(!(r.length>1)||-1!==i.id.toLowerCase().indexOf(r[1].toLowerCase())))return!0}return!1}function aiOpenSelectorWindow(e){aiDebugExtended("aiOpenSelectorWindow");var a=jQuery("#width").val(),i=jQuery("#ai-height-0").val();(a.indexOf("%")>=0||900>Number(a))&&(a=900),(a=Number(a)+40)>screen.width&&(a=screen.width),(i=i.indexOf("%")>=0?screen.height:Number(i)+480)>screen.height-50&&(i=screen.height-50);var t="width="+a+",height="+i+",left=0,top=0,resizable=1,scrollbars=1";window.open(e,"",t).focus()}function aiDisableAiResizeOptions(e){jQuery("#onload_resize_delay").prop("readonly",e),jQuery("input[id=store_height_in_cookie1]:radio, input[id=store_height_in_cookie2]:radio").attr("disabled",e),jQuery("#additional_height").prop("readonly",e),jQuery("input[id=onload_resize_width1]:radio, input[id=onload_resize_width2]:radio").attr("disabled",e),jQuery("#resize_on_click").prop("readonly",e),jQuery("#resize_on_click_elements").prop("readonly",e),jQuery("#resize_on_ajax").prop("readonly",e),jQuery("input[id=resize_on_ajax_jquery1]:radio, input[id=resize_on_ajax_jquery2]:radio").attr("disabled",e);var a="#onload_resize_delay, #store_height_in_cookie1, #additional_height, #onload_resize_width1, ";aiDisableTextSection(e,a+="#resize_on_click, #resize_on_click_elements, #resize_on_ajax, #resize_on_ajax_jquery1")}function aiDisablePartOfIframeOptions(e){jQuery("#show_part_of_iframe_x").prop("readonly",e),jQuery("#show_part_of_iframe_y").prop("readonly",e),jQuery("#show_part_of_iframe_height").prop("readonly",e),jQuery("#show_part_of_iframe_width").prop("readonly",e),jQuery("input[id=show_part_of_iframe_allow_scrollbar_horizontal1]:radio, input[id=show_part_of_iframe_allow_scrollbar_horizontal2]:radio").attr("disabled",e),jQuery("input[id=show_part_of_iframe_allow_scrollbar_vertical1]:radio, input[id=show_part_of_iframe_allow_scrollbar_vertical2]:radio").attr("disabled",e),jQuery("#show_part_of_iframe_next_viewports").prop("readonly",e),jQuery("input[id=show_part_of_iframe_next_viewports_loop1]:radio, input[id=show_part_of_iframe_next_viewports_loop2]:radio").attr("disabled",e),jQuery("#show_part_of_iframe_new_window").prop("readonly",e),jQuery("#show_part_of_iframe_new_url").prop("readonly",e),jQuery("input[id=show_part_of_iframe_next_viewports_hide1]:radio, input[id=show_part_of_iframe_next_viewports_hide2]:radio").attr("disabled",e),jQuery("#show_part_of_iframe_style").prop("readonly",e),jQuery("input[id=show_part_of_iframe_zoom1]:radio, input[id=show_part_of_iframe_zoom2]:radio, input[id=show_part_of_iframe_zoom3]:radio").attr("disabled",e),jQuery(".media-query-input").prop("readonly",e);var a="#show_part_of_iframe_x, #show_part_of_iframe_y, #show_part_of_iframe_height, #show_part_of_iframe_width, ";a+="#show_part_of_iframe_allow_scrollbar_horizontal1, #show_part_of_iframe_next_viewports, #show_part_of_iframe_next_viewports_loop1, ",a+="#show_part_of_iframe_new_window, #show_part_of_iframe_new_url, #show_part_of_iframe_next_viewports_hide1, #show_part_of_iframe_style, ",aiDisableTextSection(e,a+="#show_part_of_iframe_zoom1, #show_part_of_iframe_allow_scrollbar_vertical1, #add-media-query-show_part_of_iframe_media_query"),e?(jQuery("#add-media-query-show_part_of_iframe_media_query").hide(),jQuery(".ai-delete").hide()):(jQuery("#add-media-query-show_part_of_iframe_media_query").show(),jQuery(".ai-delete").show())}function aiDisableLazyLoadOptions(e){jQuery("#enable_lazy_load_threshold").prop("readonly",e),jQuery("#enable_lazy_load_fadetime").prop("readonly",e),jQuery("input[id=enable_lazy_load_reserve_space1]:radio, input[id=enable_lazy_load_reserve_space2]:radio").attr("disabled",e),jQuery("input[id=enable_lazy_load_manual1]:radio, input[id=enable_lazy_load_manual2]:radio, input[id=enable_lazy_load_manual3]:radio").attr("disabled",e),aiDisableTextSection(e,"#enable_lazy_load_threshold, #enable_lazy_load_fadetime, #enable_lazy_load_reserve_space1, #enable_lazy_load_manual1")}function aiDisableIframeAsLayerOptions(e){jQuery("input[id=show_iframe_as_layer_full]:radio").attr("disabled",e),jQuery("#show_iframe_as_layer_header_file").prop("readonly",e),jQuery("#show_iframe_as_layer_header_height").prop("readonly",e),jQuery("#show_iframe_as_layer_autoclick_delay").prop("readonly",e),jQuery("#show_iframe_as_layer_autoclick_hide_time").prop("readonly",e),jQuery("input[id=show_iframe_as_layer_header_position1]:radio, input[id=show_iframe_as_layer_header_position2]:radio").attr("disabled",e),jQuery("input[id=show_iframe_as_layer_full1]:radio, input[id=show_iframe_as_layer_full2]:radio, input[id=show_iframe_as_layer_full3]:radio").attr("disabled",e),jQuery("input[id=show_iframe_as_layer_keep_content1]:radio, input[id=show_iframe_as_layer_keep_content2]:radio").attr("disabled",e);var a="#show_iframe_as_layer_full, #show_iframe_as_layer_header_file, #show_iframe_as_layer_header_height, ";a+="#show_iframe_as_layer_header_position1, #show_iframe_as_layer_full1, #show_iframe_as_layer_keep_content1, ",aiDisableTextSection(e,a+="#show_iframe_as_layer_autoclick_delay, #show_iframe_as_layer_autoclick_hide_time")}function aiDisableAddParamOptions(e){jQuery("input[id=add_iframe_url_as_param_direct1]:radio, input[id=add_iframe_url_as_param_direct2]:radio").attr("disabled",e),jQuery("#add_iframe_url_as_param_prefix").prop("readonly",e),aiDisableTextSection(e,"#add_iframe_url_as_param_prefix, #add_iframe_url_as_param_direct1")}function aiDisableTextSection(e,a){e?jQuery(a).closest("tr").addClass("disabled"):jQuery(a).closest("tr").removeClass("disabled")}function aiInitAdminConfiguration(e,a){"false"===jQuery("input[type=radio][name=onload_resize]:checked").val()&&aiDisableAiResizeOptions(!0),jQuery("input[type=radio][name=onload_resize]").click(function(){"true"===jQuery(this).val()?(jQuery("input:radio[name=enable_external_height_workaround]")[1].checked=!0,aiDisableAiResizeOptions(!1)):(jQuery("#onload_resize_delay").val(""),aiDisableAiResizeOptions(!0))}),jQuery("input[type=radio][name=enable_external_height_workaround]").click(function(){"true"===jQuery(this).val()&&(jQuery("input:radio[name=onload_resize]")[1].checked=!0,jQuery("#onload_resize_delay").val(""),aiDisableAiResizeOptions(!0))}),"false"===jQuery("input[type=radio][name=show_part_of_iframe]:checked").val()&&aiDisablePartOfIframeOptions(!0),jQuery("input[type=radio][name=show_part_of_iframe]").click(function(){"false"===jQuery(this).val()?aiDisablePartOfIframeOptions(!0):aiDisablePartOfIframeOptions(!1)}),"false"===jQuery("input[type=radio][name=show_iframe_as_layer]:checked").val()&&aiDisableIframeAsLayerOptions(!0),jQuery("input[type=radio][name=show_iframe_as_layer]").click(function(){"false"===jQuery(this).val()?aiDisableIframeAsLayerOptions(!0):aiDisableIframeAsLayerOptions(!1)}),"true"===jQuery("input[type=radio][name=expert_mode]:checked").val()&&(jQuery(".description").css("display","none"),jQuery("table.form-table th").css("cursor","pointer").css("padding-top","8px").css("padding-bottom","2px").click(function(){jQuery(".description").css("display","none"),jQuery(".description",jQuery(this).parent()).css("display","block")}),jQuery("table.form-table td").css("padding-top","5px").css("padding-bottom","5px")),jQuery("input[type=radio][name=expert_mode]").click(function(){"false"===jQuery(this).val()?(jQuery(".description").css("display","block"),jQuery("table.form-table th").css("cursor","auto").css("padding-top","20px").css("padding-bottom","20px").off("click"),jQuery("table.form-table td").css("padding-top","15px").css("padding-bottom","15px")):(jQuery(".description").css("display","none"),jQuery("table.form-table th").css("cursor","pointer").css("padding-top","8px").css("padding-bottom","2px").click(function(){jQuery(".description").css("display","none"),jQuery(".description",jQuery(this).parent()).css("display","block")}),jQuery("table.form-table td").css("padding-top","5px").css("padding-bottom","5px"))});let i=jQuery("#accordion");i.find("h1").click(function(){jQuery(this).next().slideToggle(aiAccTime)}).next().hide(),i.find("a").click(function(){var e="#h1-"+jQuery(this).prop("hash").substring(1);jQuery(e).next().show(),location.hash=e}),"false"===jQuery("input[type=radio][name=enable_lazy_load_manual]:checked").val()&&jQuery("#enable_lazy_load_manual_element").prop("readonly",!0),jQuery("input[type=radio][name=enable_lazy_load_manual]").click(function(){"false"===jQuery(this).val()||"auto"===jQuery(this).val()?jQuery("#enable_lazy_load_manual_element").prop("readonly",!0):jQuery("#enable_lazy_load_manual_element").prop("readonly",!1)}),"false"===jQuery("input[type=radio][name=add_iframe_url_as_param]:checked").val()&&aiDisableAddParamOptions(!0),jQuery("input[type=radio][name=add_iframe_url_as_param]").click(function(){aiDisableAddParamOptions("false"===jQuery(this).val())}),"false"===jQuery("input[type=radio][name=enable_lazy_load]:checked").val()&&(aiDisableLazyLoadOptions(!0),jQuery("#enable_lazy_load_manual_element").prop("readonly",!0)),jQuery("input[type=radio][name=enable_lazy_load]").click(function(){if("false"===jQuery(this).val())aiDisableLazyLoadOptions(!0),jQuery("#enable_lazy_load_manual_element").prop("readonly",!0);else{aiDisableLazyLoadOptions(!1);let e=jQuery("input[type=radio][name=enable_lazy_load_manual]:checked").val();"false"===e||"auto"===e?jQuery("#enable_lazy_load_manual_element").prop("readonly",!0):jQuery("#enable_lazy_load_manual_element").prop("readonly",!1)}}),jQuery(".confirmation").on("click",function(){return confirm("Are you sure? Selecting OK will set all settings to the default.")}),jQuery(".confirmation-file").on("click",function(){return confirm("Do you really want to delete the file?")}),jQuery(".confirmation-hash").on("click",function(){return confirm("Do you really want to delete the hash/URL cache?")}),jQuery("a.post").click(function(e){e.stopPropagation(),e.preventDefault();var a,i=this.href.split("?"),t=i[0],o=i[1].split("&"),r="";t+="?"+o[0];for(var n=1,l=o.length;n<l;n++)r+='<input type="hidden" name="'+(a=o[n].split("="))[0]+'" value="'+a[1]+'" />';var s=jQuery("#twg-options").val();r+='<input type="hidden" name="twg-options" value="'+s+'" />',jQuery("body").append('<form action="'+t+'" method="post" id="poster">'+r+"</form>"),jQuery("#poster").submit()}),jQuery(".ai-input-search").keyup(function(){var e=jQuery("input.ai-input-search").val().toLowerCase();aiSettingsSearch(e,a)}).on("click",function(){setTimeout(function(){var e=jQuery("input.ai-input-search").val().toLowerCase();aiSettingsSearch(e,a)},100)}),jQuery(document).on("click",".nav-tab-wrapper a",function(){var e=jQuery(this).attr("id");return jQuery("section").hide(),jQuery("section."+e).show(),jQuery("#current_tab").val(e.substr(4,1)),jQuery(".nav-tab").removeClass("nav-tab-active"),jQuery(this).addClass("nav-tab-active"),jQuery(this).blur(),!1}),jQuery(document).on("click","a#external-workaround-link",function(){return jQuery(".external-workaround").click(),location.hash="tab_3",aiShowHeader("tab_3"),!1}),jQuery(document).on("click","a#resize-same-link",function(){return jQuery(".advanced-settings-tab").click(),jQuery("#id-advanced-resize").removeClass("closed"),location.hash="id-advanced-resize",aiShowHeader("id-advanced-resize"),!1}),jQuery(document).on("click","a.jquery-help-link",function(){return jQuery(".help-tab").click(),jQuery("#id-help-jquery").removeClass("closed"),jQuery("#jquery-help").show(),location.hash="id-help-jquery",aiShowHeader("id-help-jquery"),!1}),jQuery(document).on("click","a#browser-detection-link",function(){return jQuery(".help-tab").click(),jQuery("#id-help-browser").removeClass("closed"),jQuery("#browser-help").show(),location.hash="id-help-browser",aiShowHeader("id-help-browser"),!1}),jQuery(document).on("click","a.howto-id-link",function(){return jQuery(".help-tab").click(),jQuery("#id-help-id").removeClass("closed"),location.hash="id-help-id",aiShowHeader("id-help-id"),!1}),jQuery(document).on("click",".modifycontent-link",function(){return jQuery(".advanced-settings-tab").click(),jQuery("#id-advanced-modify-iframe").removeClass("closed"),location.hash="id-advanced-modify-iframe",aiShowHeader("id-advanced-modify-iframe","tr-"+jQuery(this).data("detail")),!1}),jQuery(document).on("click",".id-modify-css-iframe-link",function(){return jQuery(".advanced-settings-tab").click(),jQuery("#id-advanced-modify-iframe").removeClass("closed"),location.hash="id-modify-css-iframe",aiShowHeader("id-advanced-modify-iframe","tr-"+jQuery(this).data("detail")),!1}),jQuery(document).on("click",".modify-target",function(){return jQuery(".advanced-settings-tab").click(),jQuery("#id-advanced-modify-iframe").removeClass("closed"),location.hash="id-modify-target",aiShowHeader("id-advanced-modify-iframe","tr-"+jQuery(this).data("detail")),!1}),jQuery(document).on("click","a.link-external-domain",function(){return jQuery("#id-external-different").removeClass("closed"),location.hash="#id-external-different",aiShowHeader("id-external-different"),!1}),jQuery(document).on("click","a.link-id-external-ai-config-post",function(){return jQuery("#id-external-ai-config-post").removeClass("closed"),location.hash="#id-external-ai-config-post",aiShowHeader("id-external-ai-config-post","tr-use_post_message"),!1}),jQuery(document).on("click","a.link-id-external-ai-overview",function(){return jQuery("#id-external-ai-overview").removeClass("closed"),location.hash="#id-external-ai-overview",aiShowHeader("id-external-ai-overview","id-external-ai-overview"),!1}),jQuery(document).on("click","a.post-message-help-link",function(){return jQuery(".help-tab").click(),jQuery("#id-help-communication").removeClass("closed"),location.hash="#id-help-communication",aiShowHeader("id-help-communication","id-help-communication"),!1}),jQuery(document).on("click","a.enable-admin",function(){return jQuery(".options-tab").click(),jQuery("#id-options-display").removeClass("closed"),location.hash="#id-options-display",aiShowHeader("id-options-display","tr-demo"),!1}),jQuery(document).on("click","a.enter-registration",function(){return jQuery(".options-tab").click(),jQuery("#id-options-registration").removeClass("closed"),location.hash="#id-options-registration",aiShowHeader("id-options-registration","tr-demo"),!1}),jQuery(document).on("click","a.enter-pro",function(){return jQuery(".options-tab").click(),jQuery("#id-options-pro").removeClass("closed"),location.hash="#id-options-pro",aiShowHeader("id-options-pro","first"),!1}),jQuery(document).on("click","a#user-help-link",function(){return jQuery("#user-help").css("display","block"),!1}),jQuery(document).on("click","a#user-meta-link",function(){return jQuery("#meta-help").css("display","block"),!1}),jQuery(document).on("click","#ai-selector-help-link",function(){return jQuery("#ai-selector-help").slideDown(1e3),!1}),jQuery(document).on("click",".ai-selector-help-link-move",function(){return jQuery("#ai-selector-help").show("slow"),location.hash="#ai-selector-help-link",aiShowHeader("ai-selector-help-link"),!1}),jQuery("#ai_form").submit(function(){aiSetScrollposition()}),jQuery(".if-js-closed").removeClass("if-js-closed").addClass("closed"),"undefined"!=typeof postboxes&&postboxes.add_postbox_toggles("toplevel_page_advanced-iframe"),jQuery(".ai-spinner").css("display","none"),jQuery("#"+a).next().show(),jQuery(document).on("click","#test-pro-admin.is-permanent-closable button",function(){closeInfoPermanent("test-pro-admin")}),jQuery(document).on("click","#show-registration-message.is-permanent-closable button",function(){closeInfoPermanent("show-registration-message")}),jQuery(document).on("click","#show-version-message.is-permanent-closable button",function(){closeInfoPermanent("show-version-message")}),jQuery(document).on("click",".mq-breakpoint-height a",function(e){return jQuery(this).parent().remove(),aiUpdateHeightHiddenField("height"),e.preventDefault(),!1}),jQuery(document).on("click","a#add-media-query-height",function(e){var a=jQuery(".mq-breakpoint-height").length+1;return jQuery(this).parent().append('<div id="breakpoint-row-height-'+a+'" class="mq-breakpoint-height"><input type="text" id="ai-height-'+a+'" style="width:150px;margin-top:5px;" onblur="aiCheckHeightNumber(this, \'height\');" placeholder="Insert height"/> Breakpoint: <input type="text" id="ai-breakpoint-height-'+a+'" style="width:130px;" onblur="aiCheckHeightNumber(this, \'height\');" placeholder="Insert breakpoint"/><a id="delete-media-query-'+a+'" href="#" class="delete ai-delete">Delete</a>'),e.preventDefault(),!1}),jQuery(document).on("click",".mq-breakpoint-show_part_of_iframe_media_query a",function(e){return jQuery(this).parent().remove(),aiUpdateHeightHiddenFieldMediaQuery("show_part_of_iframe_media_query"),e.preventDefault(),!1}),jQuery(document).on("click","a#add-media-query-show_part_of_iframe_media_query",function(e){var a=jQuery(".mq-breakpoint-show_part_of_iframe_media_query").length+1;return jQuery(this).parent().append('<div id="breakpoint-row-show_part_of_iframe_media_query-'+a+'" class="mq-breakpoint-show_part_of_iframe_media_query">x: <input type="text" id="ai-x-show_part_of_iframe_media_query-'+a+'" class="media-query-input" onblur="aiCheckHeightNumberMediaQuery(this, \'show_part_of_iframe_media_query\');" placeholder="x"/> y: <input type="text" id="ai-y-show_part_of_iframe_media_query-'+a+'" class="media-query-input" onblur="aiCheckHeightNumberMediaQuery(this, \'show_part_of_iframe_media_query\');" placeholder="y"/> w: <input type="text" id="ai-w-show_part_of_iframe_media_query-'+a+'" class="media-query-input" onblur="aiCheckHeightNumberMediaQuery(this, \'show_part_of_iframe_media_query\');" placeholder="width"/> h: <input type="text" id="ai-h-show_part_of_iframe_media_query-'+a+'" class="media-query-input" onblur="aiCheckHeightNumberMediaQuery(this, \'show_part_of_iframe_media_query\');" placeholder="height"/> iframe width: <input type="text" id="ai-i-show_part_of_iframe_media_query-'+a+'" class="media-query-input" style="width:100px;" onblur="aiCheckHeightNumberMediaQuery(this, \'show_part_of_iframe_media_query\');" placeholder="iframe width"/> Breakpoint: <input type="text" id="ai-breakpoint-show_part_of_iframe_media_query-'+a+'" class="media-query-input" style="width:130px;" onblur="aiCheckHeightNumberMediaQuery(this, \'show_part_of_iframe_media_query\');" placeholder="Insert breakpoint"/><a id="delete-media-query-show_part_of_iframe_media_query-'+a+'" href="#" class="delete ai-delete">Delete</a>'),e.preventDefault(),!1})}function aiCheckHeightNumber(e,a){aiCheckInputNumber(e),aiUpdateHeightHiddenField(a)}function aiCheckHeightNumberMediaQuery(e,a){aiCheckInputNumber(e),aiUpdateHeightHiddenFieldMediaQuery(a)}function aiUpdateHeightHiddenField(e){var a=jQuery("#ai-"+e+"-0").val(),i=[];jQuery(".mq-breakpoint-"+e).each(function(){var e=jQuery(this).children().eq(0).val(),a=jQuery(this).children().eq(1).val();""!==e&&""!==a&&i.push({heightChild:e,breakpointChild:a})}),i.sort(function(e,a){return a.breakpointChild-e.breakpointChild});let t=a;i.forEach(function(e){t+=","+e.heightChild+"|"+e.breakpointChild}),jQuery("#"+e).val(t);let o=jQuery("#description-"+e),r=o.html().split("Shortcode attribute: ")[0];o.html(r+"Shortcode attribute: "+e+'="'+t+'"')}function aiUpdateHeightHiddenFieldMediaQuery(e){var a=[];jQuery(".mq-breakpoint-"+e).each(function(){var e=jQuery(this).children().eq(0).val(),i=jQuery(this).children().eq(1).val(),t=jQuery(this).children().eq(2).val(),o=jQuery(this).children().eq(3).val(),r=jQuery(this).children().eq(4).val(),n=jQuery(this).children().eq(5).val();(""!==e||""!==i||""!==t||""!==o||""!==r)&&""!==n&&a.push({mediaX:e,mediaY:i,mediaW:t,mediaH:o,mediaIW:r,breakpointChild:n})}),a.sort(function(e,a){return a.breakpointChild-e.breakpointChild});let i="";a.forEach(function(e){i+=","+e.mediaX+"|"+e.mediaY+"|"+e.mediaW+"|"+e.mediaH+"|"+e.mediaIW+"|"+e.breakpointChild}),i=i.replace(/(^,)|(,$)/g,""),jQuery("#"+e).val(i);let t=jQuery("#description-"+e),o=t.html().split("Shortcode attribute: ")[0];t.html(o+"Shortcode attribute: "+e+'="'+i+'"')}function aiSettingsSearch(e,a){var i=0;""!==e?(jQuery("#ai p").not(".form-table p").hide(),jQuery("#ai ul").not(".form-table ul").hide(),jQuery("#ai ol").not(".form-table ol").hide(),"false"!==a&&(jQuery("#ai h1").not(".show-always").hide(),jQuery("#ai #accordion").attr("id","acc"),jQuery("#ai #acc > div").show(),jQuery("#ai #spacer-div").show()),jQuery("#ai h2,#ai .icon_ai,#ai h3,#ai h4").not(".show-always").hide(),jQuery("#ai .form-table").addClass("ai-remove-margin"),jQuery("#ai hr, .signup_account_container, .config-file-block").hide(),jQuery("#ai .hide-always").hide(),jQuery("#ai .hide-search").hide(),jQuery("#ai .postbox-container").not(".show-always").hide(),jQuery("#ai .show-always p").show(),jQuery("#ai .show-always ul").show(),jQuery("#ai .show-always ol").show(),jQuery("#ai .show-always h2,#ai .show-always .icon_ai,#ai .show-always h3,#ai .show-always h4").show()):(jQuery("#ai p").not(".form-table p").show(),jQuery("#ai section .ai-anchor").show(),jQuery("#ai ul").not(".form-table ul").show(),jQuery("#ai ol").not(".form-table ol").show(),"false"!==a&&(jQuery("#ai h1").not(".show-always").show(),jQuery("#ai #acc").attr("id","accordion"),jQuery("#ai #accordion > div").hide(),jQuery("#ai #spacer-div").hide()),jQuery("#ai h2,#ai .icon_ai,#ai h3,#ai h4").not(".show-always").show(),jQuery("#ai .form-table").removeClass("ai-remove-margin"),jQuery("#ai hr, .signup_account_container, .config-file-block").show(),jQuery("#ai .sub-domain-container").show(),jQuery("#ai .hide-search").show(),jQuery("#ai .hide-always").hide(),jQuery("#ai .postbox-container").show(),setTimeout(function(){jQuery("#ai .postbox-container .closed .inside").css("display","")},5));let t=jQuery("#ai .mark-tab-header");t.removeClass("mark-tab-header");var o="";if(jQuery("#ai tr").each(function(){var a=jQuery(this),t=a.find("th").text(),r=a.find("p.description").text();if(t=void 0!==t?t.toLowerCase():"XXXXXXX",r=void 0!==r?r.toLowerCase():"XXXXXXX",-1===t.indexOf(e)&&-1===r.indexOf(e))0===a.parents(".show-always").length&&a.addClass("hide-setting");else{if(a.closest("table").prevAll("h2:first").show(),a.closest(".postbox-container").show(),a.closest(".postbox-container").find("h2, .inside").show(),a.closest("table").prevAll("#ai .icon_ai:first").show(),a.closest("table").nextAll("p.button-submit:first").show(),a.removeClass("hide-setting"),a.closest(".hide-search").show(),e.length>2){var n=a.closest("section").attr("class");void 0!==n&&(jQuery("#"+n).addClass("mark-tab-header"),""===o&&(o=n))}i++}}),0===i)jQuery("#ai-input-search-result").show(),t.removeClass("mark-tab-header");else{if(jQuery("#ai-input-search-result").hide(),aiInstance&&aiInstance.revert(),""!==e&&e.length>2){var r=RegExp(e,"gi");aiInstance=findAndReplaceDOMText(document.getElementById("tab_wrapper"),{find:r,wrap:"em"})}jQuery("#"+o).click()}}function aiResizeIframeRatio(e,a){aiDebugExtended("aiResizeIframeRatio");var i,t=Math.ceil(jQuery("#"+e.id).width()*parseFloat(a.replace(",",".")));e.height=t,e.style.height=t+"px"}function aiGenerateShortcode(e){var a="[advanced_iframe ";let i=jQuery("#securitykey").val();""!==i&&(a+='securitykey="'+i+'" '),a+='use_shortcode_attributes_only="true" ';var t=jQuery("#include_html").val(),o=jQuery("#include_url").val(),r=jQuery("#document_domain_add").val();if(void 0===t||""===t&&""===o){var n=jQuery("#src").val();""===n?alert("Required url is missing."):a+='src="'+n+'" ',a+=aiGenerateTextShortcode("src_hide"),a+=aiGenerateTextShortcode("width"),a+=aiGenerateTextShortcode("height"),a+=aiGenerateRadioShortcode("scrolling","none"),a+=aiGenerateRadioShortcode("add_surrounding_p","false"),a+=aiGenerateRadioShortcode("enable_ios_mobile_scolling","false"),a+=aiGenerateTextShortcode("marginwidth"),a+=aiGenerateTextShortcode("marginheight"),a+=aiGenerateTextShortcode("frameborder"),a+=aiGenerateRadioShortcode("transparency","true"),a+=aiGenerateTextShortcode("class"),a+=aiGenerateTextShortcode("style"),a+=aiGenerateTextShortcodeWithDefault("id","advanced_iframe"),a+=aiGenerateTextShortcode("name"),a+=aiGenerateRadioShortcode("allowfullscreen","false"),a+=aiGenerateTextShortcode("safari_fix_url"),a+=aiGenerateTextShortcode("sandbox"),a+=aiGenerateTextShortcode("title"),a+=aiGenerateTextShortcode("allow"),a+=aiGenerateRadioShortcode("loading","lazy"),a+=aiGenerateTextShortcode("referrerpolicy"),a+=aiGenerateTextShortcode("custom"),a+=aiGenerateTextShortcode("url_forward_parameter"),a+=aiGenerateTextShortcode("map_parameter_to_url"),a+=aiGenerateRadioShortcode("add_iframe_url_as_param","false"),a+=aiGenerateTextShortcode("add_iframe_url_as_param_prefix"),a+=aiGenerateRadioShortcode("add_iframe_url_as_param_direct","false"),a+=aiGenerateRadioShortcode("use_iframe_title_for_parent","false"),a+=aiGenerateRadioShortcode("onload_scroll_top","false"),a+=aiGenerateRadioShortcode("hide_page_until_loaded","false"),a+=aiGenerateRadioShortcode("show_iframe_loader","false"),a+=aiGenerateTextShortcode("hide_content_until_iframe_color"),a+=aiGenerateTextShortcode("iframe_zoom"),a+=aiGenerateRadioShortcode("use_zoom_absolute_fix","false"),a+=aiGenerateRadioShortcode("auto_zoom","false"),a+=aiGenerateTextShortcode("auto_zoom_by_ratio"),a+=aiGenerateRadioShortcode("enable_responsive_iframe","false"),a+=aiGenerateTextShortcode("iframe_height_ratio"),a+=aiGenerateRadioShortcode("enable_lazy_load","false"),a+=aiGenerateTextShortcodeWithDefault("enable_lazy_load_threshold","3000"),a+=aiGenerateRadioShortcode("enable_lazy_load_reserve_space","true"),a+=aiGenerateTextShortcode("enable_lazy_load_fadetime"),a+=aiGenerateRadioShortcode("enable_lazy_load_manual","false"),a+=aiGenerateRadioShortcode("enable_lazy_load_manual_element","false"),a+=aiGenerateTextShortcode("reload_interval"),a+=aiGenerateTextShortcode("hide_elements"),a+=aiGenerateTextShortcode("content_id"),a+=aiGenerateTextShortcode("content_styles"),a+=aiGenerateTextShortcode("parent_content_css"),a+=aiGenerateRadioShortcode("add_css_class_parent","false"),a+=aiGenerateTextShortcode("change_parent_links_target"),a+=aiGenerateRadioShortcode("show_iframe_as_layer","false"),a+=aiGenerateRadioShortcode("show_iframe_as_layer_full","false"),a+=aiGenerateTextShortcode("show_iframe_as_layer_autoclick_delay"),a+=aiGenerateTextShortcode("show_iframe_as_layer_autoclick_hide_time"),a+=aiGenerateTextShortcode("show_iframe_as_layer_header_file"),a+=aiGenerateTextShortcodeWithDefault("show_iframe_as_layer_header_height","100"),a+=aiGenerateRadioShortcode("show_iframe_as_layer_header_position","top"),a+=aiGenerateRadioShortcode("show_iframe_as_layer_keep_content","true");var l=aiGenerateRadioShortcode("show_part_of_iframe","false");a+=l,""!==l&&(a+=aiGenerateTextShortcodeWithDefault("show_part_of_iframe_x",-1),a+=aiGenerateTextShortcodeWithDefault("show_part_of_iframe_y",-1),a+=aiGenerateTextShortcode("show_part_of_iframe_width"),a+=aiGenerateTextShortcode("show_part_of_iframe_height"),a+=aiGenerateTextShortcode("show_part_of_iframe_media_query"),a+=aiGenerateRadioShortcode("show_part_of_iframe_allow_scrollbar_horizontal","false"),a+=aiGenerateRadioShortcode("show_part_of_iframe_allow_scrollbar_vertical","false"),a+=aiGenerateTextShortcode("show_part_of_iframe_style"),a+=aiGenerateRadioShortcode("show_part_of_iframe_zoom","false"),a+=aiGenerateTextShortcode("show_part_of_iframe_next_viewports"),a+=aiGenerateRadioShortcode("show_part_of_iframe_next_viewports_loop","false"),a+=aiGenerateTextShortcode("show_part_of_iframe_new_window"),a+=aiGenerateTextShortcode("show_part_of_iframe_new_url"),a+=aiGenerateRadioShortcode("show_part_of_iframe_next_viewports_hide","false")),a+=aiGenerateTextShortcode("hide_part_of_iframe"),a+=aiGenerateRadioShortcode("fullscreen_button","false"),a+=aiGenerateTextShortcode("fullscreen_button_hide_elements"),a+=aiGenerateRadioShortcode("fullscreen_button_full","false"),a+=aiGenerateRadioShortcode("fullscreen_button_style","black"),a+=aiGenerateRadioShortcode("add_css_class_iframe","false"),a+=aiGenerateTextShortcode("iframe_hide_elements"),a+=aiGenerateTextShortcode("onload_show_element_only"),a+=aiGenerateTextShortcode("iframe_content_id"),a+=aiGenerateTextShortcode("iframe_content_styles"),a+=aiGenerateTextShortcode("iframe_content_css"),a+=aiGenerateTextShortcode("change_iframe_links"),a+=aiGenerateTextShortcode("change_iframe_links_target"),a+=aiGenerateTextShortcode("change_iframe_links_href"),a+=aiGenerateTextShortcode("onload"),a+=aiGenerateRadioShortcode("onload_resize","false"),a+=aiGenerateTextShortcode("onload_resize_delay"),a+=aiGenerateRadioShortcode("store_height_in_cookie","false"),a+=aiGenerateTextShortcode("additional_height"),a+=aiGenerateRadioShortcode("onload_resize_width","false"),a+=aiGenerateTextShortcode("resize_on_ajax"),a+=aiGenerateRadioShortcode("resize_on_ajax_jquery","true"),a+=aiGenerateTextShortcode("resize_on_click"),a+=aiGenerateTextShortcodeWithDefault("resize_on_click_elements","a"),a+=aiGenerateTextShortcode("resize_on_element_resize"),a+=aiGenerateTextShortcodeWithDefault("resize_on_element_resize_delay","250"),a+=aiGenerateTextShortcode("tab_hidden"),a+=aiGenerateTextShortcode("tab_visible"),a+=aiGenerateRadioShortcode("add_document_domain","false"),"true"===r&&(a+=aiGenerateTextShortcode("document_domain")),a+=aiGenerateRadioShortcode("enable_external_height_workaround","external"),a+=aiGenerateRadioShortcode("hide_page_until_loaded_external","false"),a+=aiGenerateTextShortcode("pass_id_by_url"),a+=aiGenerateRadioShortcode("multi_domain_enabled","true"),"true"===e?a+=aiGenerateRadioShortcode("use_post_message","true"):a+=aiGenerateRadioShortcode("use_post_message","false"),a+=aiGenerateTextShortcode("additional_css"),a+=aiGenerateTextShortcode("additional_js"),a+=aiGenerateTextShortcode("additional_js_file_iframe"),a+=aiGenerateTextShortcode("additional_css_file_iframe")}else""===t?(a+=aiGenerateTextShortcode("include_url"),a+=aiGenerateTextShortcode("include_content"),a+=aiGenerateTextShortcode("include_height"),a+=aiGenerateTextShortcode("include_fade"),a+=aiGenerateRadioShortcode("include_hide_page_until_loaded","false")):a+=aiGenerateTextShortcode("include_html");a+=aiGenerateRadioShortcode("debug_js","false"),a=a.slice(0,-1),a+="]",jQuery("#gen-shortcode").html(a)}function aiGenerateTextShortcodeWithDefault(e,a){var i="",t=jQuery("#"+e),o=t.val();return t.length>0&&""!==o&&o!==a&&(i=e+'="'+o+'" '),i}function aiGenerateTextShortcode(e){var a="",i=jQuery("#"+e),t=i.val();return i.length>0&&""!==t&&"0"!==t&&(a=e+'="'+t+'" '),a}function aiGenerateRadioShortcode(e,a){var i="",t=jQuery("input:radio[name="+e+"]:checked"),o=t.val();return"enable_ios_mobile_scolling"===e&&(e="enable_ios_mobile_scrolling"),t.length>0&&o!==a&&(i+=e+'="'+o+'" '),i}function aiAddCssClassAllParents(e){for(var a=jQuery(e).parentsUntil("html"),i="ai-class-",t=0;t<a.length;t++){var o=jQuery(a[t]).attr("id");void 0!==o?0!==o.indexOf("ai-")&&jQuery(a[t]).addClass(i+o):jQuery(a[t]).addClass(i+t)}}function aiAutoZoomExternalHeight(e,a,i,t){aiDebugExtended("aiAutoZoomExternalHeight");var o=aiAutoZoomExternal(e,a,t),r=window["zoom_"+e],n=jQuery(document).scrollTop();return jQuery("#ai-zoom-div-"+e).css("height",Math.ceil(i*r)),jQuery("html,body").scrollTop(n),o}function aiAutoZoomExternal(e,a,i){aiDebugExtended("aiAutoZoomExternal");var t=document.getElementById(e),o=document.getElementById("ai-zoom-div-"+e),r=jQuery("#"+e);"true"===i&&r.css("max-width","100%");var n=a,l=aiGetParentIframeWidth(t);l===n&&(l=aiGetParentIframeWidth(o));var s=Math.floor(100*(l/n))/100;return s>1&&(s=1),aiSetZoom(e,s),window["zoom_"+e]=s,r.width(n).css("max-width","none"),l}function aiAutoZoom(e,a,i){aiDebugExtended("aiAutoZoom");var t,o=i.split("|");i=o[0];var r=-1;1!==o.length&&(r=o[1]);var n=document.getElementById(e);-1===r?(n.width=1,n.style.width="1px",t=aiGetIframeWidth(n),n.width=t,n.style.width=t+"px"):t=r;var l=aiAutoZoomExternal(e,t,a);if(""===i)aiResizeIframe(n,!1);else{var s=Math.ceil(t*i);n.height=s,n.style.height=s+"px";let d=jQuery("#ai-zoom-div-"+n.id);if(0!==d.length){var c=window["zoom_"+n.id];d.css("height",Math.ceil(s*c))}}return l}function aiSetZoom(e,a){jQuery("#"+e).css({"-ms-transform":"scale("+a+")","-moz-transform":"scale("+a+")","-o-transform":"scale("+a+")","-webkit-transform":"scale("+a+")",transform:"scale("+a+")"})}function aiAutoZoomViewport(e,a){for(var i=jQuery(e),t=i.parent(),o=0;t.is("p")||void 0!==t.attr("id")&&0===t.attr("id").indexOf("ai-");)if(t=t.parent(),o++>10){alert("Unexpected div structure. Please disable the zoom.");break}var r=i.width(),n=t.width(),l=i.height(),s=n/r;"true"===a&&s>1&&(s=1),aiSetZoom(i.attr("id"),s);var d=-Math.round((r-r*s)/2),c=-Math.round((l-l*s)/2);i.css({"margin-left":d+"px","margin-right":d+"px","margin-top":c+"px","margin-bottom":c+"px"})}function aiResetAiSettings(){jQuery("#action").val("reset")}function aiCheckInputNumber(e){e.value=e.value.split(" ").join("");var a=e.value;""!==e.value&&(a.match(/^(-)?([\d.])+(px|%|em|pt|vh|vw|rem|ch)?([-+])?([\d.]){0,7}(px|%|em|pt|vh|vw|rem|ch)?$/)||(alert("Please check the value you have entered. Only numbers with a dot or with an optional px, %, em or pt are allowed."),setTimeout(function(){e.focus()},10)))}function aiCheckInputPurchaseCode(e){e.value=e.value.split(" ").join("");var a=e.value;""!==e.value&&(a.match(/^([a-f0-9]{8})-(([a-f0-9]{4})-){3}([a-f0-9]{12})$/i)||(alert("Please check the value you have entered. Your input seems not to be a valid purchase code."),e.value="",setTimeout(function(){e.focus()},10)))}function aiCheckInputNumberOnly(e){e.value=e.value.split(" ").join("");var a=e.value;if(""===e.value){e.value="0";return}a.match(/^(-)?([\d.])+$/)||(alert("Please check the value you have entered. Only numbers without a dot or optional px, %, em or pt are allowed."),setTimeout(function(){e.focus()},10))}function aiShowHeader(e,a){var i=jQuery(window).scrollTop();jQuery(window).scrollTop(i-40),void 0!==a&&aiFlashElement(a)}function aiFlashElement(e){setTimeout(function(){jQuery("#"+e).css("background-color","#eee")},500),setTimeout(function(){jQuery("#"+e).css("background-color","#fff")},900),setTimeout(function(){jQuery("#"+e).css("background-color","#eee")},1300),setTimeout(function(){jQuery("#"+e).css("background-color","#fff")},1700)}function aiSetScrollposition(){var e=jQuery(document).scrollTop();jQuery("#scrollposition").val(e)}function aiResetShowPartOfAnIframe(e){jQuery("#"+e).css("top","0px").css("left","0px").css("position","static"),jQuery("#ai-div-"+e).css("width","auto").css("height","auto").css("overflow","auto").css("position","static")}function aiShowLayerIframe(e,a,i,t,o,r){aiDebugExtended("aiShowLayerIframe"),o=void 0!==o&&o,r=void 0===r||r;var n="#"+a;jQuery("#ai-zoom-div-"+a).show().css("visibility","visible"),jQuery(n).show(),jQuery(n).css("visibility","visible"),jQuery("#ai-layer-div-"+a).length&&jQuery(n="#ai-layer-div-"+a).show().css("visibility","visible"),jQuery("html").css("overflow-y","visible"),jQuery("body").css("overflow","hidden").append('<img alt="" id="ai_backlink" src="'+i+'close.png" style="z-index:100005;position:fixed;top:0;right:0;cursor:pointer" />');var l="<!-- -->";r&&"true"===t&&(l='<div id="ai-div-loader-global" style="position: fixed;z-index:100004;margin-left:-33px;left: 50%;top:50%;margin-top:-33px"><img src="'+i+'loader.gif" width="66" height="66" title="Loading" alt="Loading"></div>'),0===jQuery("#ai_backlayer").length&&jQuery(n).parent().append('<div id="ai_backlayer" style="z-index:100001;position:fixed;top:0;left:0;width:100%;height:100%;background-color: rgba(50,50,50,0.5);overflow:hidden;cursor:pointer"><!-- --></div>'+l),jQuery("#ai_backlink, #ai_backlayer").click(function(){aiHideLayerIframe(a,o)}),r||(e.preventDefault(),e.stopPropagation())}function aiHideLayerIframe(e,a){aiDebugExtended("aiHideLayerIframe");let i=jQuery("#"+e);i.css("visibility","hidden"),a||(i.attr("src","about:blank"),aiLayerIframeHrefs[e]="about:blank"),jQuery("#ai-zoom-div-"+e).css("visibility","hidden"),jQuery("#ai-layer-div-"+e).css("visibility","hidden"),jQuery("#ai_backlink").remove(),jQuery("#ai_backlayer").remove(),jQuery("#ai-div-loader-global").remove(),jQuery("body").css("overflow","auto"),jQuery("html").css("overflow-y","scroll")}var aiLayerIframeHrefs=[];function aiCheckReload(e,a){i=void 0===aiLayerIframeHrefs[a]?jQuery("#"+a).attr("src"):aiLayerIframeHrefs[a];var i,t=jQuery(e).attr("href");return aiLayerIframeHrefs[a]=t,i!==t}function aiChangeTitle(e){aiDebugExtended("aiChangeTitle");try{var a=document.getElementById(e).contentDocument.title;null!==a&&"undefined"!==a&&""!==a&&(document.title=a)}catch(i){console&&console.error&&(console.error("Advanced iframe configuration error: You have enabled to add the title if the iframe to the parent on the same domain. But you use an iframe page on a different domain. You need to use the pro version of the external workaround like described in the settings. Also check the next log. There the browser message for this error is displayed."),console.log(i))}}function aiChangeUrlParam(e,a,i,t,o){aiDebugExtended("aiChangeUrlParam");var r,n=!1;if(-1!==i.lastIndexOf("//",0)&&(i=location.protocol+i),e!==encodeURIComponent(i)){r=aiSetGetParameter(a,e);var l=!0;if(t.startsWith("hash"))return aiGetUrlMapping(e,a,t);if(t){var s=r.replace(t,"");s===r&&(l=!1),r=s}if(l&&(r=r.replace("http%3A%2F%2F",""),r=-1!==window.location.href.toLowerCase().lastIndexOf("http:",0)?r.replace("https%3A%2F%2F","s|"):r.replace("https%3A%2F%2F","")),o){r=aiRemoveQueryString(window.location.href);var d=decodeURIComponent(e),c=d.indexOf("?"),h=d.indexOf("#");-1!==c?(r+="?"+d.slice(c+1),n=!0):-1!==h&&(r+="?hash="+d.slice(h+1),n=!0)}aiEndsWidth(r,a+"=")&&(r=aiRemoveURLParameter(r,a))}else{var f=window.location.href;r=aiRemoveURLParameter(f=f.split("/"+a+"/",1)[0],a)}var u=r.indexOf("?")>=0?"&":"?";aiSetBrowserUrl(r=r.replace("#",u+"hash="),n)}function aiGetUrlMappingUrl(e,a,i){var t,o=aiRemoveURLParameter(window.location.href,e=e.replace(":short",""));if(a.startsWith("hashrewrite")){var r="";if(o.indexOf("?")>=0){var n=o.split("?");o=n[0],r="?"+n[1]}var l=o.split("/"+e+"/",1)[0];aiEndsWidth(l,"/")||(l+="/"),o=l+(e+"/")+i+r}else{var s=o.indexOf("?")>=0?"&":"?";o+=s+e+"="+i}return o}function aiSetBrowserUrl(e,a){aiSupportsHistoryApi()&&(a||(e=e.replace(/%2F/g,"/")),window.history.pushState({},"",e),window.onpopstate=function(e){e&&e.state&&window.history.back()})}function aiRemoveQueryString(e){return e.indexOf("%3F")>=0?e.split("%3F")[0]:e.indexOf("?")>=0?e.split("?")[0]:e}function aiGetUrlMapping(e,a,i){var t={action:"aip_map_url_action",security:MyAjax.security,url:e};jQuery.post(MyAjax.ajaxurl,t,function(e){aiSetBrowserUrl(aiGetUrlMappingUrl(a,i,e),!1)})}function closeInfoPermanent(e){var a={action:"aip_close_message_permanent",security:MyAjax.security,id:e},i="The message before will only appear again when you reset the advanced iframe settings.";"show-discount-message"===e?i="The message of advanced iframe shown before will only appear again when you reset the advanced iframe settings or a new discount is available.":"show-registration-message"===e&&(i="The message will appear again after a page reload."),jQuery.post(MyAjax.ajaxurl,a,function(){jQuery("h1").after('<div class="message-notice notice notice-success"><p>'+i+"</p></div>")}),setTimeout(function(){jQuery(".message-notice").fadeOut()},4e3)}function aiSupportsHistoryApi(){return!!(window.history&&history.pushState)}function aigetIframeLocation(e){try{var a=document.getElementById(e).contentWindow.location;return encodeURIComponent(a)}catch(i){console&&console.error&&(console.error("Advanced iframe configuration error: You have enabled to add the url to the url on the same domain. But you use an iframe page on a different domain. You need to use the pro version of the external workaround like described in the settings. Also check the next log. There the browser message for this error is displayed."),console.log(i))}}function aiSetGetParameter(e,a){var i=window.location.href,t=i.split("#");i=t[0];var o=void 0===t[1]?"":"#"+t[1];if(i.indexOf(e+"=")>=0){var r=i.substring(0,i.indexOf(e+"=")),n=i.substring(i.indexOf(e+"="));i=r+e+"="+a+(n=(n=n.substring(n.indexOf("=")+1)).indexOf("&")>=0?n.substring(n.indexOf("&")):"")}else 0>i.indexOf("?")?i+="?"+e+"="+a:i+="&"+e+"="+a;return i+o}function aiRemoveURLParameter(e,a){var i=e.split("?");if(!(i.length>=2))return e;for(var t=encodeURIComponent(a)+"=",o=i[1].split(/[&;]/g),r=o.length;r-- >0;)-1!==o[r].lastIndexOf(t,0)&&o.splice(r,1);return e=0!==o.length?i[0]+"?"+o.join("&"):i[0]}function aiEndsWidth(e,a){return e.substr(-a.length)===a}function aiAddCss(e,a){a=decodeURIComponent(a.replace(/\+/g,"%20"));var i=jQuery(e).contents().find("body"),t=document.createElement("style");t.setAttribute("type","text/css"),t.styleSheet?t.styleSheet.cssText=a:t.appendChild(document.createTextNode(a)),i.append(t)}function aiAddCssFile(e,a){var i=jQuery(e).contents().find("body"),t=document.createElement("link");t.rel="stylesheet",t.type="text/css",t.href=a,i.append(t)}function aiAddJsFile(e,a){jQuery.ajaxSetup({cache:!0});var i=jQuery(e).contents().find("body"),t=document.createElement("script");t.type="text/javascript",t.src=a,i.append(t)}function aiPresetFullscreen(){jQuery("#style").val("position:fixed;z-index:9000;top:0px;left:0px;margin:0px"),jQuery("#width").val("100%"),jQuery("#ai-height-0").val("100%"),jQuery("#content_id").val("html,body"),jQuery("#content_styles").val("overflow:hidden"),jQuery("#hide_content_until_iframe_color").val("#ffffff")}function aiDisableCheckIframes(){var e=jQuery("<input>").attr("type","hidden").attr("name","checkIframes").val("true");jQuery("#ai_form").append(e).submit(),jQuery("#checkIframes").prop("disabled","disabled")}function aiProcessMessage(e,a,i ){var t;try{t=JSON.parse(e.data)}catch(o){"debug"===i&&console&&console.log&&(console.log("Advanced iframe: The received message cannot be parsed and seems not to belong to advanced iframe pro. Please disable the postMessage debug mode if this o.k. and that this message is not shown anymore."),console.log("Advanced iframe: Unknown event: ",e)),t=e.data}try{if(t.hasOwnProperty("aitype")&&a===t.id){var r=t.aitype;if("debug"===r)aiProcessDebug(t);else if("scrollToTop"===r)aiProcessScrollToTop(t);else if("anchor"===r)aiProcessAnchor(t);else for(var n in"height"===r?aiProcessHeight(t):"show"===r&&aiProcessShow(t),t.data)t.data.hasOwnProperty(n)&&jQuery(n).html(t.data[n])}}catch(l){"debug"===i&&console&&console.log&&(console.log("Advanced iframe: The received message do not belong to advanced iframe pro. Please disable the postMessage debug mode if this o.k. and that this message is not shown anymore."),console.log(l))}}function aiProcessDebug(e){var a=e.data;let i=jQuery("#aiDebugDiv");0!==i.length&&(a=(a=a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")).replace('"','"').replace(/\\/g,""),i.append('<p class="ai-debug-remote"> r: '+a+"</p>"))}function aiProcessScrollToTop(e){aiScrollToTop(e.id,aiOnloadScrollTop)}function aiProcessAnchor(e){var a=e.id,i=parseInt(e.position,10),t=jQuery("#"+a).offset().top;setTimeout(function(){jQuery("html,body").scrollTop(Math.round(t+i))},100)}function aiProcessHeight(e){var a=e.height,i=e.width,t=parseInt(e.anchor,10),o=e.id;if(null!=a)try{var r=e.loc;null==r||r.includes("send_console_log")||"function"!=typeof aiChangeUrl||aiChangeUrl(r);var n=e.title;if(null!=n&&"undefined"!==n&&""!==n&&(document.title=decodeURIComponent(n)),null!=o){var l=parseInt(a,10),s=parseInt(i,10);if(aiResizeIframeHeightId(l,s,o),!isNaN(t)&&t>-1){var d=jQuery("#"+o).offset().top;setTimeout(function(){jQuery("html,body").scrollTop(Math.round(d+t)),aiShowIframeId(o)},100)}else aiShowIframeId(o)}else alert("Please update the ai_external.js to the current version.")}catch(c){console&&console.log&&console.log(c)}}function aiProcessShow(e){var a=e.id;try{aiShowIframeId(a)}catch(i){console&&console.log&&console.log(i)}}function aiDisableRightClick(e){try{window.frames[e].document.oncontextmenu=function(){return!1}}catch(a){}}function aiRemoveElementsFromHeight(e,a,i){let t=jQuery("#"+e);for(var o=i.split(","),r=0,n=0;n<o.length;n++)try{var l=o[n];if(l.includes("|")){var s=l.split("|"),d=jQuery(s[0]),c=Math.round(d.offset().top+d.outerHeight(!0)),h=Math.round(jQuery(s[1]).offset().top);r+=h-c}else"top"===l?r+=Math.round(t.offset().top):isNaN(l)?r+=jQuery(l).outerHeight(!0):r+=parseInt(l)}catch(f){console&&console.error&&(console.error('Advanced iframe configuration error: The configuration of remove_elements_from_height "'+i+'" is invalid. Please check if the elements you defined do exist and ids/classes are defined properly.'),console.log(f))}var u="calc("+a+" - "+r+"px)";t.css("height",u)}function aiTriggerAutoOpen(e,a,i,t){aiDebugExtended("aiTriggerAutoOpen"),0===i?aiOpenIframeOnClick(e,a):setTimeout(function(){aiOpenIframeOnClick(e,a)},i);var o=new Date,r=o.getTime();o.setTime(r+864e5*t);var n=a.replace(/[^A-Za-z0-9\-]/g,"");document.cookie="ai_disable_autoclick_iframe_"+n+"=Auto open is disabled until this cookie expires;expires="+o.toUTCString()+";path=/"}function aiCheckAutoOpenHash(e,a,i){if(window.location.hash){var t=window.location.hash.replace(/[^A-Za-z0-9\-]/g,"");0!==jQuery(t="#"+t).length&&jQuery(t).first().attr("target")===e&&aiTriggerAutoOpen(e,t,a,i)}}function aiOpenIframeOnClick(e,a){var i=jQuery(a).first().attr("href");jQuery("#"+e).attr("src",i),jQuery(a).first().click()}jQuery(document).ready(function(){aiDebugExtended("document.ready called"),jQuery("iframe").parent("p").css("margin","0"),aiWindowWidth=jQuery(window).width(),jQuery.each(aiReadyCallbacks,function(e,a){a()}),jQuery(".ai-fullscreen-open").on("click",function(){jQuery(this).closest(".ai-wrapper-div").addClass("ai-fullscreen-wrapper"),jQuery(this).closest(".ai-wrapper-div").find("iframe").addClass("ai-fullscreen"),jQuery(".ai-fullscreen-open").hide(),jQuery(".ai-fullscreen-hide").addClass("ai-fullscreen-display-none").hide(),jQuery("html,body").css("overflow","hidden");var e=jQuery(this).data("id");jQuery(".ai-fullscreen-close-"+e).show(),jQuery(document).on("keydown",function(e){"Escape"===e.key&&jQuery(".ai-fullscreen-close").trigger("click")}),aiOpenFullscreen(),aiInFullscreen=!0}),jQuery(".ai-fullscreen-close").on("click",function(){jQuery("div.ai-wrapper-div").removeClass("ai-fullscreen-wrapper"),jQuery("iframe.ai-fullscreen").removeClass("ai-fullscreen"),jQuery("html").css("overflow",aiOverflowHtml),jQuery("body").css("overflow",aiOverflowBody),jQuery(".ai-fullscreen-close").hide(),jQuery(".ai-fullscreen-open").show(),jQuery(".ai-fullscreen-display-none").removeClass("ai-fullscreen-display-none"),jQuery(".ai-fullscreen-hide").show(),jQuery(document).off("keydown"),aiInFullscreen&&aiCloseFullscreen()}),setTimeout(function(){jQuery("#ai #ai-updated-text").css("visibility","hidden")},4e3),jQuery("#ai #checkIframes").on("click",function(){jQuery(".ai-spinner").css("display","inline-table"),jQuery(this).addClass("disabled"),setTimeout(aiDisableCheckIframes,200)});var e=!1;if(jQuery("#aiDebugDivTotal").mousedown(function(){e=!1}).mousemove(function(){e=!0}).mouseup(function(){if(!e){var a=jQuery("#aiDebugDiv");Math.floor(a.height())>"300"?a.height("0px"):a.height("400px")}}),"undefined"!=typeof ai_show_id_only){let a=jQuery("#"+ai_show_id_only);if(0===a.length)alert('The element with the id "'+ai_show_id_only+'" cannot be found. Please check your configuration.');else{a.siblings().hide();var i=a.parents();if(i.siblings().hide(),i.css("padding","0px").css("margin","0px").css("overflow","hidden"),parent===top){var t=a[0];t.style.marginTop=t.style.marginBottom="0",t.style.overflow="hidden";var o=JSON.stringify({aitype:"height",height:parseInt(Math.max(t.scrollHeight,t.offsetHeight)+"",10),id:ai_show_id_only});window.parent.postMessage(o,"*")}}}}),String.prototype.includes||(String.prototype.includes=function(e,a){return"number"!=typeof a&&(a=0),!(a+e.length>this.length)&&-1!==this.indexOf(e,a)}),String.prototype.startsWith||(String.prototype.startsWith=function(e,a){return a=a||0,this.indexOf(e,a)===a});var elem=document.documentElement;function aiOpenFullscreen(){aiRealFullscreen&&(elem.requestFullscreen?elem.requestFullscreen():elem.webkitRequestFullscreen?elem.webkitRequestFullscreen():elem.msRequestFullscreen&&elem.msRequestFullscreen())}function aiCloseFullscreen(){aiRealFullscreen&&(document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen())}function aiExitHandler(){document.fullscreenElement||document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement||(aiInFullscreen=!1,jQuery(".ai-fullscreen-close").trigger("click"))}document.addEventListener("fullscreenchange",aiExitHandler),document.addEventListener("webkitfullscreenchange",aiExitHandler),document.addEventListener("mozfullscreenchange",aiExitHandler),document.addEventListener("MSFullscreenChange",aiExitHandler);1 /** Advanced iframe functions v2026.0. Created: 2026-02-10 22:16:29 */ 2 var aiInstance,aiEnableCookie="undefined"!=typeof x&&aiEnableCookie,aiId="",aiExtraSpace=void 0===aiExtraSpace?0:aiExtraSpace,aiAccTime=0,aiRealFullscreen=void 0!==aiRealFullscreen&&aiRealFullscreen,aiInFullscreen=!1,aiOnloadEventsCounter=0,aiOverflowHtml=jQuery("html").css("overflow")??"visible",aiOverflowBody=jQuery("body").css("overflow")??"visible",aiCallbackExists=void 0!==aiReadyCallbacks&&aiReadyCallbacks instanceof Array,aiReadyCallbacks=aiCallbackExists?aiReadyCallbacks:[];function aiDebugExtended(e){"undefined"!=typeof aiShowDebug&&aiShowDebug&&console&&console.log&&console.log("Advanced iframe: "+e)}function aiResizeIframe(e,a,i){aiDebugExtended("aiResizeIframe");try{if("about:blank"===e.contentWindow.location.href)return;if(null!=e.contentWindow.document.body){var t=jQuery(window).scrollTop();e.style.marginTop="0",e.style.marginBottom="0",e.height=Number(i),e.style.height=Number(i)+"px";var o=aiGetIframeHeight(e);aiDebugExtended("aiResizeIframe - newHeight: "+o),e.height=o,e.style.height=o+"px";let r=jQuery("#ai-zoom-div-"+e.id);if(0!==r.length){var n=window["zoom_"+e.id];r.css("height",o*n)}aiEnableCookie&&0===aiExtraSpace&&aiWriteCookie(o);var l=aiGetIframeHash(e.contentWindow.location.href);if("-1"!==l){var s="#"+e.id;try{var d=jQuery(s).contents().find("#"+l);if(0!==d.length){var c=d.offset().top;t=Math.round(jQuery(s).offset().top+c)}}catch(h){}}if(setTimeout(function(){jQuery("html,body").scrollTop(t)},50),"true"===a){var f=aiGetIframeWidth(e);e.width=f,e.style.width=f+"px"}(0,window["resizeCallback"+e.id])(),null!=window.frameElement&&parent.jQuery("iframe").trigger("onload"),aiHandleAnchorLinkScrolling(e.id)}else setTimeout(function(){aiResizeIframe(e,a)},100)}catch(u){console&&console.error&&(console.error("Advanced iframe configuration error: You have enabled the resize of the iframe for pages on the same domain. But you use an iframe page on a different domain. You need to use the external workaround like described in the settings. Also check the next log. There the browser message for this error is displayed."),console.log(u))}}function aiHandleAnchorLinkScrolling(e){var a=jQuery("#"+e),i=a.offset().top;a.contents().find("body").on("click","a[href^='#']",function(){var a=jQuery(this).attr("href"),t=jQuery("#"+e).contents().find(a);if(0!==t.length){var o=t.offset().top;jQuery("html,body").scrollTop(Math.round(i+o+2))}})}function aiGetIframeHash(e){var a;return e.split("#")[1]||"-1"}function aiGetIframeHeight(e){return Math.max(e.contentWindow.document.body.scrollHeight,e.contentWindow.document.body.offsetHeight,e.contentWindow.document.documentElement.scrollHeight,e.contentWindow.document.documentElement.offsetHeight)+aiExtraSpace}function aiGetIframeWidth(e){var a=e.width;e.width=1,e.style.width="1px";var i=Math.max(e.contentWindow.document.body.scrollWidth,e.contentWindow.document.body.offsetWidth,e.contentWindow.document.documentElement.scrollWidth,e.contentWindow.document.documentElement.offsetWidth);return 1!==i?(e.width=i,e.style.width=i+"px"):(e.width=a,e.style.width=a+"px"),i}function aiGetParentIframeWidth(e){if(null!=e){let a=jQuery("#"+e.id);return 0!==a.length?a.width():-1}}function aiResizeIframeHeightById(e,a){aiDebugExtended("aiResizeIframeHeightById - id: "+e+", nHeight: "+a);try{(0,window["resizeCallback"+e])();var i=parseInt(a,10)+aiExtraSpace,t=document.getElementById(e);if(null===t&&console&&console.error){console.error("Advanced iframe configuration error: The iframe to resize could not be found. The id of the iframe and the one defined for ai_external.js ("+e+") are most likely different! Check your settings.");return}var o=jQuery(document).scrollTop();t.height=i,t.style.height=i+"px",jQuery("html,body").scrollTop(o),aiEnableCookie&&0===aiExtraSpace&&aiWriteCookie(i);var r=window["aiExecuteWorkaround_"+e];null!=r&&r()}catch(n){console&&console.error&&(console.error("Advanced iframe configuration error: The id of the parent and the external workaround are different! Check your settings."),console.log(n))}}function aiScrollToTop(e,a){if(aiDebugExtended("aiScrollToTop - id: "+e+", position: "+a),aiOnloadEventsCounter>0){var i=0;"iframe"===a&&(i=jQuery("#"+e).offset().top),setTimeout(function(){aiDebugExtended("aiScrollToTop - posTop: "+i),window.scrollTo(0,i)},100)}setTimeout(function(){aiOnloadEventsCounter++},1e3)}function aiWriteCookie(e){var a="ai-last-height";""!==aiId&&(a=a+"-"+aiId),document.cookie=a+"="+e}function aiUseCookie(){var e="ai-last-height";""!==aiId&&(e=e+"-"+aiId);for(var a=document.cookie.split(";"),i=0;i<a.length;i++){var t=a[i].split("=")[0],o=a[i].split("=")[1];if(t===e&&null!==o&&aiIsNumeric(o)){var r=document.getElementById(aiId);r.height=parseInt(o,10),r.style.height=o+"px"}}}function aiIsNumeric(e){return!isNaN(e)}function aiDisableHeight(){jQuery("#additional_height").attr("readonly","readonly").val("0")}function aiEnableHeight(){jQuery("#additional_height").removeAttr("readonly")}function aiShowElementOnly(e,a){aiDebugExtended("aiShowElementOnly");try{var i=jQuery(e).contents().find("body"),t=i.find(a).clone(!0,!0);i.find("*").not(jQuery("script")).remove(),i.prepend(t)}catch(o){console&&console.error&&(console.error("Advanced iframe configuration error: You have enabled to show only one element of the iframe for pages on the same domain. But you use an iframe page on a different domain. You need to use the pro version of the external workaround like described in the settings. Also check the next log. There the browser message for this error is displayed."),console.log(o))}}function aiCheckIfValidTarget(e,a){e||(e=window.event),e.target?i=e.target:e.srcElement&&(i=e.srcElement),3===i.nodeType&&(i=i.parentNode);for(var i,t=a.split(","),o=0;o<t.length;++o){var r=t[o].split(":");if(r[0].toLowerCase()===i.nodeName.toLowerCase()&&(!(r.length>1)||-1!==i.id.toLowerCase().indexOf(r[1].toLowerCase())))return!0}return!1}function aiOpenSelectorWindow(e){aiDebugExtended("aiOpenSelectorWindow");var a=jQuery("#width").val(),i=jQuery("#ai-height-0").val();(a.indexOf("%")>=0||900>Number(a))&&(a=900),(a=Number(a)+40)>screen.width&&(a=screen.width),(i=i.indexOf("%")>=0?screen.height:Number(i)+480)>screen.height-50&&(i=screen.height-50);var t="width="+a+",height="+i+",left=0,top=0,resizable=1,scrollbars=1";window.open(e,"",t).focus()}function aiDisableAiResizeOptions(e){jQuery("#onload_resize_delay").prop("readonly",e),jQuery("input[id=store_height_in_cookie1]:radio, input[id=store_height_in_cookie2]:radio").attr("disabled",e),jQuery("#additional_height").prop("readonly",e),jQuery("input[id=onload_resize_width1]:radio, input[id=onload_resize_width2]:radio").attr("disabled",e),jQuery("#resize_on_click").prop("readonly",e),jQuery("#resize_on_click_elements").prop("readonly",e),jQuery("#resize_on_ajax").prop("readonly",e),jQuery("input[id=resize_on_ajax_jquery1]:radio, input[id=resize_on_ajax_jquery2]:radio").attr("disabled",e);var a="#onload_resize_delay, #store_height_in_cookie1, #additional_height, #onload_resize_width1, ";aiDisableTextSection(e,a+="#resize_on_click, #resize_on_click_elements, #resize_on_ajax, #resize_on_ajax_jquery1")}function aiDisablePartOfIframeOptions(e){jQuery("#show_part_of_iframe_x").prop("readonly",e),jQuery("#show_part_of_iframe_y").prop("readonly",e),jQuery("#show_part_of_iframe_height").prop("readonly",e),jQuery("#show_part_of_iframe_width").prop("readonly",e),jQuery("input[id=show_part_of_iframe_allow_scrollbar_horizontal1]:radio, input[id=show_part_of_iframe_allow_scrollbar_horizontal2]:radio").attr("disabled",e),jQuery("input[id=show_part_of_iframe_allow_scrollbar_vertical1]:radio, input[id=show_part_of_iframe_allow_scrollbar_vertical2]:radio").attr("disabled",e),jQuery("#show_part_of_iframe_next_viewports").prop("readonly",e),jQuery("input[id=show_part_of_iframe_next_viewports_loop1]:radio, input[id=show_part_of_iframe_next_viewports_loop2]:radio").attr("disabled",e),jQuery("#show_part_of_iframe_new_window").prop("readonly",e),jQuery("#show_part_of_iframe_new_url").prop("readonly",e),jQuery("input[id=show_part_of_iframe_next_viewports_hide1]:radio, input[id=show_part_of_iframe_next_viewports_hide2]:radio").attr("disabled",e),jQuery("#show_part_of_iframe_style").prop("readonly",e),jQuery("input[id=show_part_of_iframe_zoom1]:radio, input[id=show_part_of_iframe_zoom2]:radio, input[id=show_part_of_iframe_zoom3]:radio").attr("disabled",e),jQuery(".media-query-input").prop("readonly",e);var a="#show_part_of_iframe_x, #show_part_of_iframe_y, #show_part_of_iframe_height, #show_part_of_iframe_width, ";a+="#show_part_of_iframe_allow_scrollbar_horizontal1, #show_part_of_iframe_next_viewports, #show_part_of_iframe_next_viewports_loop1, ",a+="#show_part_of_iframe_new_window, #show_part_of_iframe_new_url, #show_part_of_iframe_next_viewports_hide1, #show_part_of_iframe_style, ",aiDisableTextSection(e,a+="#show_part_of_iframe_zoom1, #show_part_of_iframe_allow_scrollbar_vertical1, #add-media-query-show_part_of_iframe_media_query"),e?(jQuery("#add-media-query-show_part_of_iframe_media_query").hide(),jQuery(".ai-delete").hide()):(jQuery("#add-media-query-show_part_of_iframe_media_query").show(),jQuery(".ai-delete").show())}function aiDisableLazyLoadOptions(e){jQuery("#enable_lazy_load_threshold").prop("readonly",e),jQuery("#enable_lazy_load_fadetime").prop("readonly",e),jQuery("input[id=enable_lazy_load_reserve_space1]:radio, input[id=enable_lazy_load_reserve_space2]:radio").attr("disabled",e),jQuery("input[id=enable_lazy_load_manual1]:radio, input[id=enable_lazy_load_manual2]:radio, input[id=enable_lazy_load_manual3]:radio").attr("disabled",e),aiDisableTextSection(e,"#enable_lazy_load_threshold, #enable_lazy_load_fadetime, #enable_lazy_load_reserve_space1, #enable_lazy_load_manual1")}function aiDisableIframeAsLayerOptions(e){jQuery("input[id=show_iframe_as_layer_full]:radio").attr("disabled",e),jQuery("#show_iframe_as_layer_header_file").prop("readonly",e),jQuery("#show_iframe_as_layer_header_height").prop("readonly",e),jQuery("#show_iframe_as_layer_autoclick_delay").prop("readonly",e),jQuery("#show_iframe_as_layer_autoclick_hide_time").prop("readonly",e),jQuery("input[id=show_iframe_as_layer_header_position1]:radio, input[id=show_iframe_as_layer_header_position2]:radio").attr("disabled",e),jQuery("input[id=show_iframe_as_layer_full1]:radio, input[id=show_iframe_as_layer_full2]:radio, input[id=show_iframe_as_layer_full3]:radio").attr("disabled",e),jQuery("input[id=show_iframe_as_layer_keep_content1]:radio, input[id=show_iframe_as_layer_keep_content2]:radio").attr("disabled",e);var a="#show_iframe_as_layer_full, #show_iframe_as_layer_header_file, #show_iframe_as_layer_header_height, ";a+="#show_iframe_as_layer_header_position1, #show_iframe_as_layer_full1, #show_iframe_as_layer_keep_content1, ",aiDisableTextSection(e,a+="#show_iframe_as_layer_autoclick_delay, #show_iframe_as_layer_autoclick_hide_time")}function aiDisableAddParamOptions(e){jQuery("input[id=add_iframe_url_as_param_direct1]:radio, input[id=add_iframe_url_as_param_direct2]:radio").attr("disabled",e),jQuery("#add_iframe_url_as_param_prefix").prop("readonly",e),aiDisableTextSection(e,"#add_iframe_url_as_param_prefix, #add_iframe_url_as_param_direct1")}function aiDisableTextSection(e,a){e?jQuery(a).closest("tr").addClass("disabled"):jQuery(a).closest("tr").removeClass("disabled")}function aiInitAdminConfiguration(e,a){"false"===jQuery("input[type=radio][name=onload_resize]:checked").val()&&aiDisableAiResizeOptions(!0),jQuery("input[type=radio][name=onload_resize]").click(function(){"true"===jQuery(this).val()?(jQuery("input:radio[name=enable_external_height_workaround]")[1].checked=!0,aiDisableAiResizeOptions(!1)):(jQuery("#onload_resize_delay").val(""),aiDisableAiResizeOptions(!0))}),jQuery("input[type=radio][name=enable_external_height_workaround]").click(function(){"true"===jQuery(this).val()&&(jQuery("input:radio[name=onload_resize]")[1].checked=!0,jQuery("#onload_resize_delay").val(""),aiDisableAiResizeOptions(!0))}),"false"===jQuery("input[type=radio][name=show_part_of_iframe]:checked").val()&&aiDisablePartOfIframeOptions(!0),jQuery("input[type=radio][name=show_part_of_iframe]").click(function(){"false"===jQuery(this).val()?aiDisablePartOfIframeOptions(!0):aiDisablePartOfIframeOptions(!1)}),"false"===jQuery("input[type=radio][name=show_iframe_as_layer]:checked").val()&&aiDisableIframeAsLayerOptions(!0),jQuery("input[type=radio][name=show_iframe_as_layer]").click(function(){"false"===jQuery(this).val()?aiDisableIframeAsLayerOptions(!0):aiDisableIframeAsLayerOptions(!1)}),"true"===jQuery("input[type=radio][name=expert_mode]:checked").val()&&(jQuery(".description").css("display","none"),jQuery("table.form-table th").css("cursor","pointer").css("padding-top","8px").css("padding-bottom","2px").click(function(){jQuery(".description").css("display","none"),jQuery(".description",jQuery(this).parent()).css("display","block")}),jQuery("table.form-table td").css("padding-top","5px").css("padding-bottom","5px")),jQuery("input[type=radio][name=expert_mode]").click(function(){"false"===jQuery(this).val()?(jQuery(".description").css("display","block"),jQuery("table.form-table th").css("cursor","auto").css("padding-top","20px").css("padding-bottom","20px").off("click"),jQuery("table.form-table td").css("padding-top","15px").css("padding-bottom","15px")):(jQuery(".description").css("display","none"),jQuery("table.form-table th").css("cursor","pointer").css("padding-top","8px").css("padding-bottom","2px").click(function(){jQuery(".description").css("display","none"),jQuery(".description",jQuery(this).parent()).css("display","block")}),jQuery("table.form-table td").css("padding-top","5px").css("padding-bottom","5px"))});let i=jQuery("#accordion");i.find("h1").click(function(){jQuery(this).next().slideToggle(aiAccTime)}).next().hide(),i.find("a").click(function(){var e="#h1-"+jQuery(this).prop("hash").substring(1);jQuery(e).next().show(),location.hash=e}),"false"===jQuery("input[type=radio][name=enable_lazy_load_manual]:checked").val()&&jQuery("#enable_lazy_load_manual_element").prop("readonly",!0),jQuery("input[type=radio][name=enable_lazy_load_manual]").click(function(){"false"===jQuery(this).val()||"auto"===jQuery(this).val()?jQuery("#enable_lazy_load_manual_element").prop("readonly",!0):jQuery("#enable_lazy_load_manual_element").prop("readonly",!1)}),"false"===jQuery("input[type=radio][name=add_iframe_url_as_param]:checked").val()&&aiDisableAddParamOptions(!0),jQuery("input[type=radio][name=add_iframe_url_as_param]").click(function(){aiDisableAddParamOptions("false"===jQuery(this).val())}),"false"===jQuery("input[type=radio][name=enable_lazy_load]:checked").val()&&(aiDisableLazyLoadOptions(!0),jQuery("#enable_lazy_load_manual_element").prop("readonly",!0)),jQuery("input[type=radio][name=enable_lazy_load]").click(function(){if("false"===jQuery(this).val())aiDisableLazyLoadOptions(!0),jQuery("#enable_lazy_load_manual_element").prop("readonly",!0);else{aiDisableLazyLoadOptions(!1);let e=jQuery("input[type=radio][name=enable_lazy_load_manual]:checked").val();"false"===e||"auto"===e?jQuery("#enable_lazy_load_manual_element").prop("readonly",!0):jQuery("#enable_lazy_load_manual_element").prop("readonly",!1)}}),jQuery(".confirmation").on("click",function(){return confirm("Are you sure? Selecting OK will set all settings to the default.")}),jQuery(".confirmation-file").on("click",function(){return confirm("Do you really want to delete the file?")}),jQuery(".confirmation-hash").on("click",function(){return confirm("Do you really want to delete the hash/URL cache?")}),jQuery("a.post").click(function(e){e.stopPropagation(),e.preventDefault();var a,i=this.href.split("?"),t=i[0],o=i[1].split("&"),r="";t+="?"+o[0];for(var n=1,l=o.length;n<l;n++)r+='<input type="hidden" name="'+(a=o[n].split("="))[0]+'" value="'+a[1]+'" />';var s=jQuery("#twg-options").val();r+='<input type="hidden" name="twg-options" value="'+s+'" />',jQuery("body").append('<form action="'+t+'" method="post" id="poster">'+r+"</form>"),jQuery("#poster").submit()}),jQuery(".ai-input-search").keyup(function(){var e=jQuery("input.ai-input-search").val().toLowerCase();aiSettingsSearch(e,a)}).on("click",function(){setTimeout(function(){var e=jQuery("input.ai-input-search").val().toLowerCase();aiSettingsSearch(e,a)},100)}),jQuery(document).on("click",".nav-tab-wrapper a",function(){var e=jQuery(this).attr("id");return jQuery("section").hide(),jQuery("section."+e).show(),jQuery("#current_tab").val(e.substr(4,1)),jQuery(".nav-tab").removeClass("nav-tab-active"),jQuery(this).addClass("nav-tab-active"),jQuery(this).blur(),!1}),jQuery(document).on("click","a#external-workaround-link",function(){return jQuery(".external-workaround").click(),location.hash="tab_3",aiShowHeader("tab_3"),!1}),jQuery(document).on("click","a#resize-same-link",function(){return jQuery(".advanced-settings-tab").click(),jQuery("#id-advanced-resize").removeClass("closed"),location.hash="id-advanced-resize",aiShowHeader("id-advanced-resize"),!1}),jQuery(document).on("click","a.jquery-help-link",function(){return jQuery(".help-tab").click(),jQuery("#id-help-jquery").removeClass("closed"),jQuery("#jquery-help").show(),location.hash="id-help-jquery",aiShowHeader("id-help-jquery"),!1}),jQuery(document).on("click","a#browser-detection-link",function(){return jQuery(".help-tab").click(),jQuery("#id-help-browser").removeClass("closed"),jQuery("#browser-help").show(),location.hash="id-help-browser",aiShowHeader("id-help-browser"),!1}),jQuery(document).on("click","a.howto-id-link",function(){return jQuery(".help-tab").click(),jQuery("#id-help-id").removeClass("closed"),location.hash="id-help-id",aiShowHeader("id-help-id"),!1}),jQuery(document).on("click",".modifycontent-link",function(){return jQuery(".advanced-settings-tab").click(),jQuery("#id-advanced-modify-iframe").removeClass("closed"),location.hash="id-advanced-modify-iframe",aiShowHeader("id-advanced-modify-iframe","tr-"+jQuery(this).data("detail")),!1}),jQuery(document).on("click",".id-modify-css-iframe-link",function(){return jQuery(".advanced-settings-tab").click(),jQuery("#id-advanced-modify-iframe").removeClass("closed"),location.hash="id-modify-css-iframe",aiShowHeader("id-advanced-modify-iframe","tr-"+jQuery(this).data("detail")),!1}),jQuery(document).on("click",".modify-target",function(){return jQuery(".advanced-settings-tab").click(),jQuery("#id-advanced-modify-iframe").removeClass("closed"),location.hash="id-modify-target",aiShowHeader("id-advanced-modify-iframe","tr-"+jQuery(this).data("detail")),!1}),jQuery(document).on("click","a.link-external-domain",function(){return jQuery("#id-external-different").removeClass("closed"),location.hash="#id-external-different",aiShowHeader("id-external-different"),!1}),jQuery(document).on("click","a.link-id-external-ai-config-post",function(){return jQuery("#id-external-ai-config-post").removeClass("closed"),location.hash="#id-external-ai-config-post",aiShowHeader("id-external-ai-config-post","tr-use_post_message"),!1}),jQuery(document).on("click","a.link-id-external-ai-overview",function(){return jQuery("#id-external-ai-overview").removeClass("closed"),location.hash="#id-external-ai-overview",aiShowHeader("id-external-ai-overview","id-external-ai-overview"),!1}),jQuery(document).on("click","a.post-message-help-link",function(){return jQuery(".help-tab").click(),jQuery("#id-help-communication").removeClass("closed"),location.hash="#id-help-communication",aiShowHeader("id-help-communication","id-help-communication"),!1}),jQuery(document).on("click","a.enable-admin",function(){return jQuery(".options-tab").click(),jQuery("#id-options-display").removeClass("closed"),location.hash="#id-options-display",aiShowHeader("id-options-display","tr-demo"),!1}),jQuery(document).on("click","a.enter-registration",function(){return jQuery(".options-tab").click(),jQuery("#id-options-registration").removeClass("closed"),location.hash="#id-options-registration",aiShowHeader("id-options-registration","tr-demo"),!1}),jQuery(document).on("click","a.enter-pro",function(){return jQuery(".options-tab").click(),jQuery("#id-options-pro").removeClass("closed"),location.hash="#id-options-pro",aiShowHeader("id-options-pro","first"),!1}),jQuery(document).on("click","a#user-help-link",function(){return jQuery("#user-help").css("display","block"),!1}),jQuery(document).on("click","a#user-meta-link",function(){return jQuery("#meta-help").css("display","block"),!1}),jQuery(document).on("click","#ai-selector-help-link",function(){return jQuery("#ai-selector-help").slideDown(1e3),!1}),jQuery(document).on("click",".ai-selector-help-link-move",function(){return jQuery("#ai-selector-help").show("slow"),location.hash="#ai-selector-help-link",aiShowHeader("ai-selector-help-link"),!1}),jQuery("#ai_form").submit(function(){aiSetScrollposition()}),jQuery(".if-js-closed").removeClass("if-js-closed").addClass("closed"),"undefined"!=typeof postboxes&&postboxes.add_postbox_toggles("toplevel_page_advanced-iframe"),jQuery(".ai-spinner").css("display","none"),jQuery("#"+a).next().show(),jQuery(document).on("click","#test-pro-admin.is-permanent-closable button",function(){closeInfoPermanent("test-pro-admin")}),jQuery(document).on("click","#show-registration-message.is-permanent-closable button",function(){closeInfoPermanent("show-registration-message")}),jQuery(document).on("click","#show-version-message.is-permanent-closable button",function(){closeInfoPermanent("show-version-message")}),jQuery(document).on("click",".mq-breakpoint-height a",function(e){return jQuery(this).parent().remove(),aiUpdateHeightHiddenField("height"),e.preventDefault(),!1}),jQuery(document).on("click","a#add-media-query-height",function(e){var a=jQuery(".mq-breakpoint-height").length+1;return jQuery(this).parent().append('<div id="breakpoint-row-height-'+a+'" class="mq-breakpoint-height"><input type="text" id="ai-height-'+a+'" style="width:150px;margin-top:5px;" onblur="aiCheckHeightNumber(this, \'height\');" placeholder="Insert height"/> Breakpoint: <input type="text" id="ai-breakpoint-height-'+a+'" style="width:130px;" onblur="aiCheckHeightNumber(this, \'height\');" placeholder="Insert breakpoint"/><a id="delete-media-query-'+a+'" href="#" class="delete ai-delete">Delete</a>'),e.preventDefault(),!1}),jQuery(document).on("click",".mq-breakpoint-show_part_of_iframe_media_query a",function(e){return jQuery(this).parent().remove(),aiUpdateHeightHiddenFieldMediaQuery("show_part_of_iframe_media_query"),e.preventDefault(),!1}),jQuery(document).on("click","a#add-media-query-show_part_of_iframe_media_query",function(e){var a=jQuery(".mq-breakpoint-show_part_of_iframe_media_query").length+1;return jQuery(this).parent().append('<div id="breakpoint-row-show_part_of_iframe_media_query-'+a+'" class="mq-breakpoint-show_part_of_iframe_media_query">x: <input type="text" id="ai-x-show_part_of_iframe_media_query-'+a+'" class="media-query-input" onblur="aiCheckHeightNumberMediaQuery(this, \'show_part_of_iframe_media_query\');" placeholder="x"/> y: <input type="text" id="ai-y-show_part_of_iframe_media_query-'+a+'" class="media-query-input" onblur="aiCheckHeightNumberMediaQuery(this, \'show_part_of_iframe_media_query\');" placeholder="y"/> w: <input type="text" id="ai-w-show_part_of_iframe_media_query-'+a+'" class="media-query-input" onblur="aiCheckHeightNumberMediaQuery(this, \'show_part_of_iframe_media_query\');" placeholder="width"/> h: <input type="text" id="ai-h-show_part_of_iframe_media_query-'+a+'" class="media-query-input" onblur="aiCheckHeightNumberMediaQuery(this, \'show_part_of_iframe_media_query\');" placeholder="height"/> iframe width: <input type="text" id="ai-i-show_part_of_iframe_media_query-'+a+'" class="media-query-input" style="width:100px;" onblur="aiCheckHeightNumberMediaQuery(this, \'show_part_of_iframe_media_query\');" placeholder="iframe width"/> Breakpoint: <input type="text" id="ai-breakpoint-show_part_of_iframe_media_query-'+a+'" class="media-query-input" style="width:130px;" onblur="aiCheckHeightNumberMediaQuery(this, \'show_part_of_iframe_media_query\');" placeholder="Insert breakpoint"/><a id="delete-media-query-show_part_of_iframe_media_query-'+a+'" href="#" class="delete ai-delete">Delete</a>'),e.preventDefault(),!1})}function aiCheckHeightNumber(e,a){aiCheckInputNumber(e),aiUpdateHeightHiddenField(a)}function aiCheckHeightNumberMediaQuery(e,a){aiCheckInputNumber(e),aiUpdateHeightHiddenFieldMediaQuery(a)}function aiUpdateHeightHiddenField(e){var a=jQuery("#ai-"+e+"-0").val(),i=[];jQuery(".mq-breakpoint-"+e).each(function(){var e=jQuery(this).children().eq(0).val(),a=jQuery(this).children().eq(1).val();""!==e&&""!==a&&i.push({heightChild:e,breakpointChild:a})}),i.sort(function(e,a){return a.breakpointChild-e.breakpointChild});let t=a;i.forEach(function(e){t+=","+e.heightChild+"|"+e.breakpointChild}),jQuery("#"+e).val(t);let o=jQuery("#description-"+e),r=o.html().split("Shortcode attribute: ")[0];o.html(r+"Shortcode attribute: "+e+'="'+t+'"')}function aiUpdateHeightHiddenFieldMediaQuery(e){var a=[];jQuery(".mq-breakpoint-"+e).each(function(){var e=jQuery(this).children().eq(0).val(),i=jQuery(this).children().eq(1).val(),t=jQuery(this).children().eq(2).val(),o=jQuery(this).children().eq(3).val(),r=jQuery(this).children().eq(4).val(),n=jQuery(this).children().eq(5).val();(""!==e||""!==i||""!==t||""!==o||""!==r)&&""!==n&&a.push({mediaX:e,mediaY:i,mediaW:t,mediaH:o,mediaIW:r,breakpointChild:n})}),a.sort(function(e,a){return a.breakpointChild-e.breakpointChild});let i="";a.forEach(function(e){i+=","+e.mediaX+"|"+e.mediaY+"|"+e.mediaW+"|"+e.mediaH+"|"+e.mediaIW+"|"+e.breakpointChild}),i=i.replace(/(^,)|(,$)/g,""),jQuery("#"+e).val(i);let t=jQuery("#description-"+e),o=t.html().split("Shortcode attribute: ")[0];t.html(o+"Shortcode attribute: "+e+'="'+i+'"')}function aiSettingsSearch(e,a){var i=0;""!==e?(jQuery("#ai p").not(".form-table p").hide(),jQuery("#ai ul").not(".form-table ul").hide(),jQuery("#ai ol").not(".form-table ol").hide(),"false"!==a&&(jQuery("#ai h1").not(".show-always").hide(),jQuery("#ai #accordion").attr("id","acc"),jQuery("#ai #acc > div").show(),jQuery("#ai #spacer-div").show()),jQuery("#ai h2,#ai .icon_ai,#ai h3,#ai h4").not(".show-always").hide(),jQuery("#ai .form-table").addClass("ai-remove-margin"),jQuery("#ai hr, .signup_account_container, .config-file-block").hide(),jQuery("#ai .hide-always").hide(),jQuery("#ai .hide-search").hide(),jQuery("#ai .postbox-container").not(".show-always").hide(),jQuery("#ai .show-always p").show(),jQuery("#ai .show-always ul").show(),jQuery("#ai .show-always ol").show(),jQuery("#ai .show-always h2,#ai .show-always .icon_ai,#ai .show-always h3,#ai .show-always h4").show()):(jQuery("#ai p").not(".form-table p").show(),jQuery("#ai section .ai-anchor").show(),jQuery("#ai ul").not(".form-table ul").show(),jQuery("#ai ol").not(".form-table ol").show(),"false"!==a&&(jQuery("#ai h1").not(".show-always").show(),jQuery("#ai #acc").attr("id","accordion"),jQuery("#ai #accordion > div").hide(),jQuery("#ai #spacer-div").hide()),jQuery("#ai h2,#ai .icon_ai,#ai h3,#ai h4").not(".show-always").show(),jQuery("#ai .form-table").removeClass("ai-remove-margin"),jQuery("#ai hr, .signup_account_container, .config-file-block").show(),jQuery("#ai .sub-domain-container").show(),jQuery("#ai .hide-search").show(),jQuery("#ai .hide-always").hide(),jQuery("#ai .postbox-container").show(),setTimeout(function(){jQuery("#ai .postbox-container .closed .inside").css("display","")},5));let t=jQuery("#ai .mark-tab-header");t.removeClass("mark-tab-header");var o="";if(jQuery("#ai tr").each(function(){var a=jQuery(this),t=a.find("th").text(),r=a.find("p.description").text();if(t=void 0!==t?t.toLowerCase():"XXXXXXX",r=void 0!==r?r.toLowerCase():"XXXXXXX",-1===t.indexOf(e)&&-1===r.indexOf(e))0===a.parents(".show-always").length&&a.addClass("hide-setting");else{if(a.closest("table").prevAll("h2:first").show(),a.closest(".postbox-container").show(),a.closest(".postbox-container").find("h2, .inside").show(),a.closest("table").prevAll("#ai .icon_ai:first").show(),a.closest("table").nextAll("p.button-submit:first").show(),a.removeClass("hide-setting"),a.closest(".hide-search").show(),e.length>2){var n=a.closest("section").attr("class");void 0!==n&&(jQuery("#"+n).addClass("mark-tab-header"),""===o&&(o=n))}i++}}),0===i)jQuery("#ai-input-search-result").show(),t.removeClass("mark-tab-header");else{if(jQuery("#ai-input-search-result").hide(),aiInstance&&aiInstance.revert(),""!==e&&e.length>2){var r=RegExp(e,"gi");aiInstance=findAndReplaceDOMText(document.getElementById("tab_wrapper"),{find:r,wrap:"em"})}jQuery("#"+o).click()}}function aiResizeIframeRatio(e,a){aiDebugExtended("aiResizeIframeRatio");var i,t=Math.ceil(jQuery("#"+e.id).width()*parseFloat(a.replace(",",".")));e.height=t,e.style.height=t+"px"}function aiGenerateShortcode(e){var a="[advanced_iframe ";let i=jQuery("#securitykey").val();""!==i&&(a+='securitykey="'+i+'" '),a+='use_shortcode_attributes_only="true" ';var t=jQuery("#include_html").val(),o=jQuery("#include_url").val(),r=jQuery("#document_domain_add").val();if(void 0===t||""===t&&""===o){var n=jQuery("#src").val();""===n?alert("Required url is missing."):a+='src="'+n+'" ',a+=aiGenerateTextShortcode("src_hide"),a+=aiGenerateTextShortcode("width"),a+=aiGenerateTextShortcode("height"),a+=aiGenerateRadioShortcode("scrolling","none"),a+=aiGenerateRadioShortcode("add_surrounding_p","false"),a+=aiGenerateRadioShortcode("enable_ios_mobile_scolling","false"),a+=aiGenerateTextShortcode("marginwidth"),a+=aiGenerateTextShortcode("marginheight"),a+=aiGenerateTextShortcode("frameborder"),a+=aiGenerateRadioShortcode("transparency","true"),a+=aiGenerateTextShortcode("class"),a+=aiGenerateTextShortcode("style"),a+=aiGenerateTextShortcodeWithDefault("id","advanced_iframe"),a+=aiGenerateTextShortcode("name"),a+=aiGenerateRadioShortcode("allowfullscreen","false"),a+=aiGenerateTextShortcode("safari_fix_url"),a+=aiGenerateTextShortcode("sandbox"),a+=aiGenerateTextShortcode("title"),a+=aiGenerateTextShortcode("allow"),a+=aiGenerateRadioShortcode("loading","lazy"),a+=aiGenerateTextShortcode("referrerpolicy"),a+=aiGenerateTextShortcode("custom"),a+=aiGenerateTextShortcode("url_forward_parameter"),a+=aiGenerateTextShortcode("map_parameter_to_url"),a+=aiGenerateRadioShortcode("add_iframe_url_as_param","false"),a+=aiGenerateTextShortcode("add_iframe_url_as_param_prefix"),a+=aiGenerateRadioShortcode("add_iframe_url_as_param_direct","false"),a+=aiGenerateRadioShortcode("use_iframe_title_for_parent","false"),a+=aiGenerateRadioShortcode("onload_scroll_top","false"),a+=aiGenerateRadioShortcode("hide_page_until_loaded","false"),a+=aiGenerateRadioShortcode("show_iframe_loader","false"),a+=aiGenerateTextShortcode("hide_content_until_iframe_color"),a+=aiGenerateTextShortcode("iframe_zoom"),a+=aiGenerateRadioShortcode("use_zoom_absolute_fix","false"),a+=aiGenerateRadioShortcode("auto_zoom","false"),a+=aiGenerateTextShortcode("auto_zoom_by_ratio"),a+=aiGenerateRadioShortcode("enable_responsive_iframe","false"),a+=aiGenerateTextShortcode("iframe_height_ratio"),a+=aiGenerateRadioShortcode("enable_lazy_load","false"),a+=aiGenerateTextShortcodeWithDefault("enable_lazy_load_threshold","3000"),a+=aiGenerateRadioShortcode("enable_lazy_load_reserve_space","true"),a+=aiGenerateTextShortcode("enable_lazy_load_fadetime"),a+=aiGenerateRadioShortcode("enable_lazy_load_manual","false"),a+=aiGenerateRadioShortcode("enable_lazy_load_manual_element","false"),a+=aiGenerateTextShortcode("reload_interval"),a+=aiGenerateTextShortcode("hide_elements"),a+=aiGenerateTextShortcode("content_id"),a+=aiGenerateTextShortcode("content_styles"),a+=aiGenerateTextShortcode("parent_content_css"),a+=aiGenerateRadioShortcode("add_css_class_parent","false"),a+=aiGenerateTextShortcode("change_parent_links_target"),a+=aiGenerateRadioShortcode("show_iframe_as_layer","false"),a+=aiGenerateRadioShortcode("show_iframe_as_layer_full","false"),a+=aiGenerateTextShortcode("show_iframe_as_layer_autoclick_delay"),a+=aiGenerateTextShortcode("show_iframe_as_layer_autoclick_hide_time"),a+=aiGenerateTextShortcode("show_iframe_as_layer_header_file"),a+=aiGenerateTextShortcodeWithDefault("show_iframe_as_layer_header_height","100"),a+=aiGenerateRadioShortcode("show_iframe_as_layer_header_position","top"),a+=aiGenerateRadioShortcode("show_iframe_as_layer_keep_content","true");var l=aiGenerateRadioShortcode("show_part_of_iframe","false");a+=l,""!==l&&(a+=aiGenerateTextShortcodeWithDefault("show_part_of_iframe_x",-1),a+=aiGenerateTextShortcodeWithDefault("show_part_of_iframe_y",-1),a+=aiGenerateTextShortcode("show_part_of_iframe_width"),a+=aiGenerateTextShortcode("show_part_of_iframe_height"),a+=aiGenerateTextShortcode("show_part_of_iframe_media_query"),a+=aiGenerateRadioShortcode("show_part_of_iframe_allow_scrollbar_horizontal","false"),a+=aiGenerateRadioShortcode("show_part_of_iframe_allow_scrollbar_vertical","false"),a+=aiGenerateTextShortcode("show_part_of_iframe_style"),a+=aiGenerateRadioShortcode("show_part_of_iframe_zoom","false"),a+=aiGenerateTextShortcode("show_part_of_iframe_next_viewports"),a+=aiGenerateRadioShortcode("show_part_of_iframe_next_viewports_loop","false"),a+=aiGenerateTextShortcode("show_part_of_iframe_new_window"),a+=aiGenerateTextShortcode("show_part_of_iframe_new_url"),a+=aiGenerateRadioShortcode("show_part_of_iframe_next_viewports_hide","false")),a+=aiGenerateTextShortcode("hide_part_of_iframe"),a+=aiGenerateRadioShortcode("fullscreen_button","false"),a+=aiGenerateTextShortcode("fullscreen_button_hide_elements"),a+=aiGenerateRadioShortcode("fullscreen_button_full","false"),a+=aiGenerateRadioShortcode("fullscreen_button_style","black"),a+=aiGenerateRadioShortcode("add_css_class_iframe","false"),a+=aiGenerateTextShortcode("iframe_hide_elements"),a+=aiGenerateTextShortcode("onload_show_element_only"),a+=aiGenerateTextShortcode("iframe_content_id"),a+=aiGenerateTextShortcode("iframe_content_styles"),a+=aiGenerateTextShortcode("iframe_content_css"),a+=aiGenerateTextShortcode("change_iframe_links"),a+=aiGenerateTextShortcode("change_iframe_links_target"),a+=aiGenerateTextShortcode("change_iframe_links_href"),a+=aiGenerateTextShortcode("onload"),a+=aiGenerateRadioShortcode("onload_resize","false"),a+=aiGenerateTextShortcode("onload_resize_delay"),a+=aiGenerateRadioShortcode("store_height_in_cookie","false"),a+=aiGenerateTextShortcode("additional_height"),a+=aiGenerateRadioShortcode("onload_resize_width","false"),a+=aiGenerateTextShortcode("resize_on_ajax"),a+=aiGenerateRadioShortcode("resize_on_ajax_jquery","true"),a+=aiGenerateTextShortcode("resize_on_click"),a+=aiGenerateTextShortcodeWithDefault("resize_on_click_elements","a"),a+=aiGenerateTextShortcode("resize_on_element_resize"),a+=aiGenerateTextShortcodeWithDefault("resize_on_element_resize_delay","250"),a+=aiGenerateTextShortcode("tab_hidden"),a+=aiGenerateTextShortcode("tab_visible"),a+=aiGenerateRadioShortcode("add_document_domain","false"),"true"===r&&(a+=aiGenerateTextShortcode("document_domain")),a+=aiGenerateRadioShortcode("enable_external_height_workaround","external"),a+=aiGenerateRadioShortcode("hide_page_until_loaded_external","false"),a+=aiGenerateTextShortcode("pass_id_by_url"),a+=aiGenerateRadioShortcode("multi_domain_enabled","true"),"true"===e?a+=aiGenerateRadioShortcode("use_post_message","true"):a+=aiGenerateRadioShortcode("use_post_message","false"),a+=aiGenerateTextShortcode("additional_css"),a+=aiGenerateTextShortcode("additional_js"),a+=aiGenerateTextShortcode("additional_js_file_iframe"),a+=aiGenerateTextShortcode("additional_css_file_iframe")}else""===t?(a+=aiGenerateTextShortcode("include_url"),a+=aiGenerateTextShortcode("include_content"),a+=aiGenerateTextShortcode("include_height"),a+=aiGenerateTextShortcode("include_fade"),a+=aiGenerateRadioShortcode("include_hide_page_until_loaded","false")):a+=aiGenerateTextShortcode("include_html");a+=aiGenerateRadioShortcode("debug_js","false"),a=a.slice(0,-1),a+="]",jQuery("#gen-shortcode").html(a)}function aiGenerateTextShortcodeWithDefault(e,a){var i="",t=jQuery("#"+e),o=t.val();return t.length>0&&""!==o&&o!==a&&(i=e+'="'+o+'" '),i}function aiGenerateTextShortcode(e){var a="",i=jQuery("#"+e),t=i.val();return i.length>0&&""!==t&&"0"!==t&&(a=e+'="'+t+'" '),a}function aiGenerateRadioShortcode(e,a){var i="",t=jQuery("input:radio[name="+e+"]:checked"),o=t.val();return"enable_ios_mobile_scolling"===e&&(e="enable_ios_mobile_scrolling"),t.length>0&&o!==a&&(i+=e+'="'+o+'" '),i}function aiAddCssClassAllParents(e){for(var a=jQuery(e).parentsUntil("html"),i="ai-class-",t=0;t<a.length;t++){var o=jQuery(a[t]).attr("id");void 0!==o?0!==o.indexOf("ai-")&&jQuery(a[t]).addClass(i+o):jQuery(a[t]).addClass(i+t)}}function aiAutoZoomExternalHeight(e,a,i,t){aiDebugExtended("aiAutoZoomExternalHeight");var o=aiAutoZoomExternal(e,a,t),r=window["zoom_"+e],n=jQuery(document).scrollTop();return jQuery("#ai-zoom-div-"+e).css("height",Math.ceil(i*r)),jQuery("html,body").scrollTop(n),o}function aiAutoZoomExternal(e,a,i){aiDebugExtended("aiAutoZoomExternal");var t=document.getElementById(e),o=document.getElementById("ai-zoom-div-"+e),r=jQuery("#"+e);"true"===i&&r.css("max-width","100%");var n=a,l=aiGetParentIframeWidth(t);l===n&&(l=aiGetParentIframeWidth(o));var s=Math.floor(100*(l/n))/100;return s>1&&(s=1),aiSetZoom(e,s),window["zoom_"+e]=s,r.width(n).css("max-width","none"),l}function aiAutoZoom(e,a,i){aiDebugExtended("aiAutoZoom");var t,o=i.split("|");i=o[0];var r=-1;1!==o.length&&(r=o[1]);var n=document.getElementById(e);-1===r?(n.width=1,n.style.width="1px",t=aiGetIframeWidth(n),n.width=t,n.style.width=t+"px"):t=r;var l=aiAutoZoomExternal(e,t,a);if(""===i)aiResizeIframe(n,!1);else{var s=Math.ceil(t*i);n.height=s,n.style.height=s+"px";let d=jQuery("#ai-zoom-div-"+n.id);if(0!==d.length){var c=window["zoom_"+n.id];d.css("height",Math.ceil(s*c))}}return l}function aiSetZoom(e,a){jQuery("#"+e).css({"-ms-transform":"scale("+a+")","-moz-transform":"scale("+a+")","-o-transform":"scale("+a+")","-webkit-transform":"scale("+a+")",transform:"scale("+a+")"})}function aiAutoZoomViewport(e,a){for(var i=jQuery(e),t=i.parent(),o=0;t.is("p")||void 0!==t.attr("id")&&0===t.attr("id").indexOf("ai-");)if(t=t.parent(),o++>10){alert("Unexpected div structure. Please disable the zoom.");break}var r=i.width(),n=t.width(),l=i.height(),s=n/r;"true"===a&&s>1&&(s=1),aiSetZoom(i.attr("id"),s);var d=-Math.round((r-r*s)/2),c=-Math.round((l-l*s)/2);i.css({"margin-left":d+"px","margin-right":d+"px","margin-top":c+"px","margin-bottom":c+"px"})}function aiResetAiSettings(){jQuery("#action").val("reset")}function aiCheckInputNumber(e){e.value=e.value.split(" ").join("");var a=e.value;""!==e.value&&(a.match(/^(-)?([\d.])+(px|%|em|pt|vh|vw|rem|ch)?([-+])?([\d.]){0,7}(px|%|em|pt|vh|vw|rem|ch)?$/)||(alert("Please check the value you have entered. Only numbers with a dot or with an optional px, %, em or pt are allowed."),setTimeout(function(){e.focus()},10)))}function aiCheckInputPurchaseCode(e){e.value=e.value.split(" ").join("");var a=e.value;""!==e.value&&(a.match(/^([a-f0-9]{8})-(([a-f0-9]{4})-){3}([a-f0-9]{12})$/i)||(alert("Please check the value you have entered. Your input seems not to be a valid purchase code."),e.value="",setTimeout(function(){e.focus()},10)))}function aiCheckInputNumberOnly(e){e.value=e.value.split(" ").join("");var a=e.value;if(""===e.value){e.value="0";return}a.match(/^(-)?([\d.])+$/)||(alert("Please check the value you have entered. Only numbers without a dot or optional px, %, em or pt are allowed."),setTimeout(function(){e.focus()},10))}function aiShowHeader(e,a){var i=jQuery(window).scrollTop();jQuery(window).scrollTop(i-40),void 0!==a&&aiFlashElement(a)}function aiFlashElement(e){setTimeout(function(){jQuery("#"+e).css("background-color","#eee")},500),setTimeout(function(){jQuery("#"+e).css("background-color","#fff")},900),setTimeout(function(){jQuery("#"+e).css("background-color","#eee")},1300),setTimeout(function(){jQuery("#"+e).css("background-color","#fff")},1700)}function aiSetScrollposition(){var e=jQuery(document).scrollTop();jQuery("#scrollposition").val(e)}function aiResetShowPartOfAnIframe(e){jQuery("#"+e).css("top","0px").css("left","0px").css("position","static"),jQuery("#ai-div-"+e).css("width","auto").css("height","auto").css("overflow","auto").css("position","static")}function aiShowLayerIframe(e,a,i,t,o,r){aiDebugExtended("aiShowLayerIframe"),o=void 0!==o&&o,r=void 0===r||r;var n="#"+a;jQuery("#ai-zoom-div-"+a).show().css("visibility","visible"),jQuery(n).show(),jQuery(n).css("visibility","visible"),jQuery("#ai-layer-div-"+a).length&&jQuery(n="#ai-layer-div-"+a).show().css("visibility","visible"),jQuery("html").css("overflow-y","visible"),jQuery("body").css("overflow","hidden").append('<img alt="" id="ai_backlink" src="'+i+'close.png" style="z-index:100005;position:fixed;top:0;right:0;cursor:pointer" />');var l="<!-- -->";r&&"true"===t&&(l='<div id="ai-div-loader-global" style="position: fixed;z-index:100004;margin-left:-33px;left: 50%;top:50%;margin-top:-33px"><img src="'+i+'loader.gif" width="66" height="66" title="Loading" alt="Loading"></div>'),0===jQuery("#ai_backlayer").length&&jQuery(n).parent().append('<div id="ai_backlayer" style="z-index:100001;position:fixed;top:0;left:0;width:100%;height:100%;background-color: rgba(50,50,50,0.5);overflow:hidden;cursor:pointer"><!-- --></div>'+l),jQuery("#ai_backlink, #ai_backlayer").click(function(){aiHideLayerIframe(a,o)}),r||(e.preventDefault(),e.stopPropagation())}function aiHideLayerIframe(e,a){aiDebugExtended("aiHideLayerIframe");let i=jQuery("#"+e);i.css("visibility","hidden"),a||(i.attr("src","about:blank"),aiLayerIframeHrefs[e]="about:blank"),jQuery("#ai-zoom-div-"+e).css("visibility","hidden"),jQuery("#ai-layer-div-"+e).css("visibility","hidden"),jQuery("#ai_backlink").remove(),jQuery("#ai_backlayer").remove(),jQuery("#ai-div-loader-global").remove(),jQuery("body").css("overflow","auto"),jQuery("html").css("overflow-y","scroll")}var aiLayerIframeHrefs=[];function aiCheckReload(e,a){i=void 0===aiLayerIframeHrefs[a]?jQuery("#"+a).attr("src"):aiLayerIframeHrefs[a];var i,t=jQuery(e).attr("href");return aiLayerIframeHrefs[a]=t,i!==t}function aiChangeTitle(e){aiDebugExtended("aiChangeTitle");try{var a=document.getElementById(e).contentDocument.title;null!==a&&"undefined"!==a&&""!==a&&(document.title=a)}catch(i){console&&console.error&&(console.error("Advanced iframe configuration error: You have enabled to add the title if the iframe to the parent on the same domain. But you use an iframe page on a different domain. You need to use the pro version of the external workaround like described in the settings. Also check the next log. There the browser message for this error is displayed."),console.log(i))}}function aiChangeUrlParam(e,a,i,t,o){aiDebugExtended("aiChangeUrlParam");var r,n=!1;if(-1!==i.lastIndexOf("//",0)&&(i=location.protocol+i),e!==encodeURIComponent(i)){r=aiSetGetParameter(a,e);var l=!0;if(t.startsWith("hash"))return aiGetUrlMapping(e,a,t);if(t){var s=r.replace(t,"");s===r&&(l=!1),r=s}if(l&&(r=r.replace("http%3A%2F%2F",""),r=-1!==window.location.href.toLowerCase().lastIndexOf("http:",0)?r.replace("https%3A%2F%2F","s|"):r.replace("https%3A%2F%2F","")),o){r=aiRemoveQueryString(window.location.href);var d=decodeURIComponent(e),c=d.indexOf("?"),h=d.indexOf("#");-1!==c?(r+="?"+d.slice(c+1),n=!0):-1!==h&&(r+="?hash="+d.slice(h+1),n=!0)}aiEndsWidth(r,a+"=")&&(r=aiRemoveURLParameter(r,a))}else{var f=window.location.href;r=aiRemoveURLParameter(f=f.split("/"+a+"/",1)[0],a)}var u=r.indexOf("?")>=0?"&":"?";aiSetBrowserUrl(r=r.replace("#",u+"hash="),n)}function aiGetUrlMappingUrl(e,a,i){var t,o=aiRemoveURLParameter(window.location.href,e=e.replace(":short",""));if(a.startsWith("hashrewrite")){var r="";if(o.indexOf("?")>=0){var n=o.split("?");o=n[0],r="?"+n[1]}var l=o.split("/"+e+"/",1)[0];aiEndsWidth(l,"/")||(l+="/"),o=l+(e+"/")+i+r}else{var s=o.indexOf("?")>=0?"&":"?";o+=s+e+"="+i}return o}function aiSetBrowserUrl(e,a){aiSupportsHistoryApi()&&(a||(e=e.replace(/%2F/g,"/")),window.history.pushState({},"",e),window.onpopstate=function(e){e&&e.state&&window.history.back()})}function aiRemoveQueryString(e){return e.indexOf("%3F")>=0?e.split("%3F")[0]:e.indexOf("?")>=0?e.split("?")[0]:e}function aiGetUrlMapping(e,a,i){var t={action:"aip_map_url_action",security:MyAjax.security,url:e};jQuery.post(MyAjax.ajaxurl,t,function(e){aiSetBrowserUrl(aiGetUrlMappingUrl(a,i,e),!1)})}function closeInfoPermanent(e){var a={action:"aip_close_message_permanent",security:MyAjax.security,id:e},i="The message before will only appear again when you reset the advanced iframe settings.";"show-discount-message"===e?i="The message of advanced iframe shown before will only appear again when you reset the advanced iframe settings or a new discount is available.":"show-registration-message"===e&&(i="The message will appear again after a page reload."),jQuery.post(MyAjax.ajaxurl,a,function(){jQuery("h1").after('<div class="message-notice notice notice-success"><p>'+i+"</p></div>")}),setTimeout(function(){jQuery(".message-notice").fadeOut()},4e3)}function aiSupportsHistoryApi(){return!!(window.history&&history.pushState)}function aigetIframeLocation(e){try{var a=document.getElementById(e).contentWindow.location;return encodeURIComponent(a)}catch(i){console&&console.error&&(console.error("Advanced iframe configuration error: You have enabled to add the url to the url on the same domain. But you use an iframe page on a different domain. You need to use the pro version of the external workaround like described in the settings. Also check the next log. There the browser message for this error is displayed."),console.log(i))}}function aiSetGetParameter(e,a){var i=window.location.href,t=i.split("#");i=t[0];var o=void 0===t[1]?"":"#"+t[1];if(i.indexOf(e+"=")>=0){var r=i.substring(0,i.indexOf(e+"=")),n=i.substring(i.indexOf(e+"="));i=r+e+"="+a+(n=(n=n.substring(n.indexOf("=")+1)).indexOf("&")>=0?n.substring(n.indexOf("&")):"")}else 0>i.indexOf("?")?i+="?"+e+"="+a:i+="&"+e+"="+a;return i+o}function aiRemoveURLParameter(e,a){var i=e.split("?");if(!(i.length>=2))return e;for(var t=encodeURIComponent(a)+"=",o=i[1].split(/[&;]/g),r=o.length;r-- >0;)-1!==o[r].lastIndexOf(t,0)&&o.splice(r,1);return e=0!==o.length?i[0]+"?"+o.join("&"):i[0]}function aiEndsWidth(e,a){return e.substr(-a.length)===a}function aiAddCss(e,a){a=decodeURIComponent(a.replace(/\+/g,"%20"));var i=jQuery(e).contents().find("body"),t=document.createElement("style");t.setAttribute("type","text/css"),t.styleSheet?t.styleSheet.cssText=a:t.appendChild(document.createTextNode(a)),i.append(t)}function aiAddCssFile(e,a){var i=jQuery(e).contents().find("body"),t=document.createElement("link");t.rel="stylesheet",t.type="text/css",t.href=a,i.append(t)}function aiAddJsFile(e,a){jQuery.ajaxSetup({cache:!0});var i=jQuery(e).contents().find("body"),t=document.createElement("script");t.type="text/javascript",t.src=a,i.append(t)}function aiPresetFullscreen(){jQuery("#style").val("position:fixed;z-index:9000;top:0px;left:0px;margin:0px"),jQuery("#width").val("100%"),jQuery("#ai-height-0").val("100%"),jQuery("#content_id").val("html,body"),jQuery("#content_styles").val("overflow:hidden"),jQuery("#hide_content_until_iframe_color").val("#ffffff")}function aiDisableCheckIframes(){var e=jQuery("<input>").attr("type","hidden").attr("name","checkIframes").val("true");jQuery("#ai_form").append(e).submit(),jQuery("#checkIframes").prop("disabled","disabled")}function aiProcessMessage(e,a,i,t,o,r){var n;try{n=JSON.parse(e.data)}catch(l){"debug"===i&&console&&console.log&&(console.log("Advanced iframe: The received message cannot be parsed and seems not to belong to advanced iframe pro. Please disable the postMessage debug mode if this o.k. and that this message is not shown anymore."),console.log("Advanced iframe: Unknown event: ",e)),n=e.data}try{if(n.hasOwnProperty("aitype")&&a===n.id){var s=n.aitype;if("debug"===s)aiProcessDebug(n);else if("scrollToTop"===s)aiProcessScrollToTop(n);else if("anchor"===s)aiProcessAnchor(n);else for(var d in"height"===s?aiProcessHeight(n,o,r):"show"===s&&aiProcessShow(n),n.data)n.data.hasOwnProperty(d)&&aiIsValidKey(d,t)&&jQuery(d).html(aiRemoveScriptTags(n.data[d]))}}catch(c){"debug"===i&&console&&console.log&&(console.log("Advanced iframe: The received message do not belong to advanced iframe pro. Please disable the postMessage debug mode if this o.k. and that this message is not shown anymore."),console.log(c))}}function aiIsValidKey(e,a){if(!a)return!1;for(var i=a.split(","),t=0;t<i.length;t++)if(i[t].split("|")[0].trim()===e)return!0;return!1}function aiRemoveScriptTags(e){let a=jQuery("<div>").html(e);return a.find("script").remove(),a.html()}function aiProcessDebug(e){var a=e.data;let i=jQuery("#aiDebugDiv");0!==i.length&&(a=(a=a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")).replace('"','"').replace(/\\/g,""),i.append('<p class="ai-debug-remote"> r: '+a+"</p>"))}function aiProcessScrollToTop(e){aiScrollToTop(e.id,aiOnloadScrollTop)}function aiProcessAnchor(e){var a=e.id,i=parseInt(e.position,10),t=jQuery("#"+a).offset().top;setTimeout(function(){jQuery("html,body").scrollTop(Math.round(t+i))},100)}function aiProcessHeight(e,a,i){var t=e.height,o=e.width,r=parseInt(e.anchor,10),n=e.id;if(null!=t)try{if("remote"==a){var l=e.loc;null==l||l.includes("send_console_log")||"function"!=typeof aiChangeUrl||aiChangeUrl(l)}if("remote"==i){var s=e.title;null!=s&&"undefined"!==s&&""!==s&&(document.title=decodeURIComponent(s))}if(null!=n){var d=parseInt(t,10),c=parseInt(o,10);if(aiResizeIframeHeightId(d,c,n),!isNaN(r)&&r>-1){var h=jQuery("#"+n).offset().top;setTimeout(function(){jQuery("html,body").scrollTop(Math.round(h+r)),aiShowIframeId(n)},100)}else aiShowIframeId(n)}else alert("Please update the ai_external.js to the current version.")}catch(f){console&&console.log&&console.log(f)}}function aiProcessShow(e){var a=e.id;try{aiShowIframeId(a)}catch(i){console&&console.log&&console.log(i)}}function aiDisableRightClick(e){try{window.frames[e].document.oncontextmenu=function(){return!1}}catch(a){}}function aiRemoveElementsFromHeight(e,a,i){let t=jQuery("#"+e);for(var o=i.split(","),r=0,n=0;n<o.length;n++)try{var l=o[n];if(l.includes("|")){var s=l.split("|"),d=jQuery(s[0]),c=Math.round(d.offset().top+d.outerHeight(!0)),h=Math.round(jQuery(s[1]).offset().top);r+=h-c}else"top"===l?r+=Math.round(t.offset().top):isNaN(l)?r+=jQuery(l).outerHeight(!0):r+=parseInt(l)}catch(f){console&&console.error&&(console.error('Advanced iframe configuration error: The configuration of remove_elements_from_height "'+i+'" is invalid. Please check if the elements you defined do exist and ids/classes are defined properly.'),console.log(f))}var u="calc("+a+" - "+r+"px)";t.css("height",u)}function aiTriggerAutoOpen(e,a,i,t){aiDebugExtended("aiTriggerAutoOpen"),0===i?aiOpenIframeOnClick(e,a):setTimeout(function(){aiOpenIframeOnClick(e,a)},i);var o=new Date,r=o.getTime();o.setTime(r+864e5*t);var n=a.replace(/[^A-Za-z0-9\-]/g,"");document.cookie="ai_disable_autoclick_iframe_"+n+"=Auto open is disabled until this cookie expires;expires="+o.toUTCString()+";path=/"}function aiCheckAutoOpenHash(e,a,i){if(window.location.hash){var t=window.location.hash.replace(/[^A-Za-z0-9\-]/g,"");0!==jQuery(t="#"+t).length&&jQuery(t).first().attr("target")===e&&aiTriggerAutoOpen(e,t,a,i)}}function aiOpenIframeOnClick(e,a){var i=jQuery(a).first().attr("href");jQuery("#"+e).attr("src",i),jQuery(a).first().click()}jQuery(document).ready(function(){aiDebugExtended("document.ready called"),jQuery("iframe").parent("p").css("margin","0"),aiWindowWidth=jQuery(window).width(),jQuery.each(aiReadyCallbacks,function(e,a){a()}),jQuery(".ai-fullscreen-open").on("click",function(){jQuery(this).closest(".ai-wrapper-div").addClass("ai-fullscreen-wrapper"),jQuery(this).closest(".ai-wrapper-div").find("iframe").addClass("ai-fullscreen"),jQuery(".ai-fullscreen-open").hide(),jQuery(".ai-fullscreen-hide").addClass("ai-fullscreen-display-none").hide(),jQuery("html,body").css("overflow","hidden");var e=jQuery(this).data("id");jQuery(".ai-fullscreen-close-"+e).show(),jQuery(document).on("keydown",function(e){"Escape"===e.key&&jQuery(".ai-fullscreen-close").trigger("click")}),aiOpenFullscreen(),aiInFullscreen=!0}),jQuery(".ai-fullscreen-close").on("click",function(){jQuery("div.ai-wrapper-div").removeClass("ai-fullscreen-wrapper"),jQuery("iframe.ai-fullscreen").removeClass("ai-fullscreen"),jQuery("html").css("overflow",aiOverflowHtml),jQuery("body").css("overflow",aiOverflowBody),jQuery(".ai-fullscreen-close").hide(),jQuery(".ai-fullscreen-open").show(),jQuery(".ai-fullscreen-display-none").removeClass("ai-fullscreen-display-none"),jQuery(".ai-fullscreen-hide").show(),jQuery(document).off("keydown"),aiInFullscreen&&aiCloseFullscreen()}),setTimeout(function(){jQuery("#ai #ai-updated-text").css("visibility","hidden")},4e3),jQuery("#ai #checkIframes").on("click",function(){jQuery(".ai-spinner").css("display","inline-table"),jQuery(this).addClass("disabled"),setTimeout(aiDisableCheckIframes,200)});var e=!1;if(jQuery("#aiDebugDivTotal").mousedown(function(){e=!1}).mousemove(function(){e=!0}).mouseup(function(){if(!e){var a=jQuery("#aiDebugDiv");Math.floor(a.height())>"300"?a.height("0px"):a.height("400px")}}),"undefined"!=typeof ai_show_id_only){let a=jQuery("#"+ai_show_id_only);if(0===a.length)alert('The element with the id "'+ai_show_id_only+'" cannot be found. Please check your configuration.');else{a.siblings().hide();var i=a.parents();if(i.siblings().hide(),i.css("padding","0px").css("margin","0px").css("overflow","hidden"),parent===top){var t=a[0];t.style.marginTop=t.style.marginBottom="0",t.style.overflow="hidden";var o=JSON.stringify({aitype:"height",height:parseInt(Math.max(t.scrollHeight,t.offsetHeight)+"",10),id:ai_show_id_only});window.parent.postMessage(o,"*")}}}}),String.prototype.includes||(String.prototype.includes=function(e,a){return"number"!=typeof a&&(a=0),!(a+e.length>this.length)&&-1!==this.indexOf(e,a)}),String.prototype.startsWith||(String.prototype.startsWith=function(e,a){return a=a||0,this.indexOf(e,a)===a});var elem=document.documentElement;function aiOpenFullscreen(){aiRealFullscreen&&(elem.requestFullscreen?elem.requestFullscreen():elem.webkitRequestFullscreen?elem.webkitRequestFullscreen():elem.msRequestFullscreen&&elem.msRequestFullscreen())}function aiCloseFullscreen(){aiRealFullscreen&&(document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen())}function aiExitHandler(){document.fullscreenElement||document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement||(aiInFullscreen=!1,jQuery(".ai-fullscreen-close").trigger("click"))}document.addEventListener("fullscreenchange",aiExitHandler),document.addEventListener("webkitfullscreenchange",aiExitHandler),document.addEventListener("mozfullscreenchange",aiExitHandler),document.addEventListener("MSFullscreenChange",aiExitHandler); -
advanced-iframe/trunk/readme.txt
r3426298 r3475865 2 2 Contributors: mdempfle 3 3 Tags: iframe, embed, resize, shortcode, modify css 4 Requires at least: 3.3 5 Tested up to: 6.9 6 Stable tag: 2025.10 7 Requires PHP: 5.44 Stable tag: 2026.0 5 Tested up to: 6.9.1 6 Requires at least: 5.5 7 Requires PHP: 7.4 8 8 License: GPLv3 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0 … … 167 167 168 168 == Changelog == 169 = 2026.0 = 170 - Breaking change: Due to the security fix for "Add iframe URL as param" and "Prefix/id/urlrewrite for iframe URL," the hash/hashrewrite needs to be set in both the administration AND the shortcode. 171 - Breaking change: The postMessage send from the iframe is only processed if the feature is enabled. This was added for: "Add iframe URL as param", "Use the iframe title for the parent", "Include content directly from the iframe". Please read the updated documentation. Most users will not have to do anything, because the default way to configure this features by the administration, has not changed. If is only different if you configured them directly in the ai_external.js 172 - Security fix: The feature "Include content directly from the iframe" was accepting any postMessage in the correct structure and adding it to the parent page. Now the feature needs to be enabled and also the input is sanitized by removing all script tags. If you enable this feature only the configured keys are accepted. Make sure that you trust the page you include as you extract content from there! 173 - Security fix: Cross-Site Scripting (XSS) was reported by Patch Stack. The setting additional_height has now XSS detection. The same sanitation was also applied to iframe_zoom and onload_scroll_top. See https://www.wordfence.com/threat-intel/vulnerabilities/id/dcdcb29e-48d0-4e22-8e11-0c76b4355268 and https://patchstack.com/database/Wordpress/Plugin/advanced-iframe/vulnerability/wordpress-advanced-iframe-plugin-2025-10-cross-site-scripting-xss-vulnerability?_s_id=cve 174 - Security fix: Broken Access Control reported by the patch stack has been fixed. There is no official CVE number yet. The URL cache is now a first-in, first-out (FIFO) cache and cannot be fully filled anymore. The cache is now only active if "Add iframe URL as param" with hash/hashrewrite is enabled. The cache size is now shown in the administration, and additional documentation has been added. 175 - Security fix: At hide_part_of_iframe the URL was escaped with esc_html and not esc_url. Now settings like javascript:alert%28document.domain%29 are removed. 176 - New: Tested with WordPress 6.9.1 177 - New: Tested with PHP 8.5. The entire code was also analyzed with ChatGPT 5.2, which reported no breaking changes. 178 - New: The minimum PHP version has been increased to 7.4. While the plugin itself still works with lower versions, such PHP versions are insecure and should no longer be used! 179 - New: The minimum WordPress version was increased to 5.5. The plugin works with older versions of WordPress, but they are insecure and should not be used. 180 - Fix: user meta and user info data output is using esc_html to avoid that invalid data can cause any issues. 181 - Fix: The debug console has now removed any global background image from its div to always be displayed properly. 182 - Fix: id could be set to empty which leads to issues in the Javascript. Not it is mandatory and checked in the administration and in the external workaround. 183 - Fix: Changed the demo link from "Use the iframe title for the parent" from the general demo page to the sub demo where it is used. 184 - Fix: The style shortcode attribute is now always concatenated with a ; 185 169 186 = 2025.10 = 170 187 - New: Tested with WordPress 6.9
Note: See TracChangeset
for help on using the changeset viewer.