PluginProbe
Parse.ly / 3.18.0
Parse.ly v3.18.0
3.24.1 3.24.0 3.23.7 3.23.6 3.23.5 3.23.4 3.23.3 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.17.0 3.18.0 3.18.1 3.19.0 3.19.1 3.19.2 3.19.3 3.2.0 3.2.1 3.20.0 3.20.1 3.20.2 3.20.3 All 105 releases
wp-parsely / build / admin-settings.js

admin-settings.js in Parse.ly 3.18.0, at build/admin-settings.js

1 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 !function(){"use strict";!function(){function e(){var e,t,n=""!==location.hash?location.hash.substring(1):"basic-section";null===(e=document.querySelectorAll(".nav-tab"))||void 0===e||e.forEach((function(e){e.classList.contains(n+"-tab")?e.classList.add("nav-tab-active"):e.classList.remove("nav-tab-active")})),null===(t=document.querySelectorAll(".tab-content"))||void 0===t||t.forEach((function(e){e.classList.contains(n)?e.setAttribute("style","display: initial"):e.setAttribute("style","display: none")}));var i=document.querySelector('form[name="parsely"]');i&&(i.removeAttribute("hidden"),i.setAttribute("action","options.php#".concat(n)))}function t(e){var t=e.target.dataset.option,n=window.wp.media({multiple:!1,library:{type:"image"}});n.on("select",(function(){var e=n.state().get("selection").first().toJSON().url,i="#media-single-image-"+t+" input.file-path",o=document.querySelector(i);o&&(o.value=e)})),n.open()}document.addEventListener("DOMContentLoaded",(function(){var n;!function(){var e=document.querySelector("input#content_helper_ai_features_enabled"),t=document.querySelectorAll("input#content_helper_smart_linking_enabled, input#content_helper_title_suggestions_enabled, input#content_helper_excerpt_suggestions_enabled"),n=document.querySelectorAll("div.content-helper-section fieldset");function i(){e&&(e.checked?n.forEach((function(e){c(e,!1),t.forEach((function(e){o(e)}))})):(n.forEach((function(t){t.querySelector("#".concat(e.id))||c(t)})),document.querySelectorAll("label.prevent-disable").forEach((function(e){a(e,!1)}))))}function o(e){var t,n,i=null===(n=null===(t=e.closest("fieldset"))||void 0===t?void 0:t.nextSibling)||void 0===n?void 0:n.nextSibling;e.checked?c([e,i],!1):(c(i),a(e.parentElement))}function a(e,t){void 0===t&&(t=!0),t?e.classList.add("prevent-disable"):e.classList.remove("prevent-disable")}function c(e,t){void 0===t&&(t=!0),Array.isArray(e)||(e=[e]),e.forEach((function(e){t?e.setAttribute("disabled","disabled"):e.removeAttribute("disabled")}))}(function(){var e;null===(e=document.querySelector('.wp-admin form[name="parsely"]'))||void 0===e||e.addEventListener("submit",(function(){var e=".wp-admin .content-helper-section fieldset";document.querySelectorAll("".concat(e,"[disabled]")).forEach((function(t){var n,i;null===(i=null===(n=t.parentElement)||void 0===n?void 0:n.parentElement)||void 0===i||i.classList.add("disabled-before-posting"),t.querySelectorAll("".concat(e,' label input[type="checkbox"]')).forEach((function(e){e.classList.add("disabled")})),t.removeAttribute("disabled")}))}))})(),i(),null==e||e.addEventListener("change",(function(){i()})),t.forEach((function(e){e.addEventListener("change",(function(){o(e)}))}))}(),e(),window.addEventListener("hashchange",e),null===(n=document.querySelector(".media-single-image button.browse"))||void 0===n||n.addEventListener("click",t)}))}()}();