芝麻web文件管理V1.00
编辑当前文件:/var/www/cognitio.in/wp-content/plugins/woocommerce/assets/client/admin/wp-admin-scripts/settings-tracking.js
!function(){"use strict";var e={};(function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(e),window.wp.i18n;var t=window.wc.data,o=window.wp.data;window.wc.navigation;const n="customer-effort-score-exit-page";let i=!1;const c=(0,o.resolveSelect)(t.OPTIONS_STORE_NAME).getOption("woocommerce_allow_tracking").then((e=>{i="yes"===e})),r={},a=(e,t)=>{r[e]=()=>{t()&&(async e=>{if(await c,!window.localStorage||!i)return;let t=(()=>{if(!window.localStorage)return[];const e=window.localStorage.getItem(n),t=e?JSON.parse(e):[];return Array.isArray(t)?t:[]})();t.find((t=>t===e))||t.push(e),t=t.slice(-10),window.localStorage.setItem(n,JSON.stringify(t))})(e)},window.addEventListener("unload",r[e])};function s(e){const t=e.querySelectorAll("input, select, textarea"),o={};for(const e of t){const t=e.name||e.id;if("button"!==e.type&&"image"!==e.type&&"submit"!==e.type&&"hidden"!==e.type&&t)switch(e.type){case"checkbox":o[t]=+e.checked;break;case"radio":void 0===o[t]&&(o[t]=""),e.checked&&(o[t]=e.value);break;case"select-multiple":const n=[];for(const t of e.options)t.selected&&n.push(t.value);o[t]=n;break;default:o[t]=e.value}}return o}const l=document.forms;if(l&&l.mainform){let e=!1;const t=document.querySelector(".woocommerce-save-button");t&&t.addEventListener("click",(()=>{e=!0}));const o=s(l.mainform);a("settings_change",(()=>{if(e)return!1;const t=l.mainform?s(l.mainform):{};let n=!1;for(const e of Object.keys(o))if(("object"==typeof o[e]?JSON.stringify(o[e]):o[e])!==("object"==typeof t[e]?JSON.stringify(t[e]):t[e])){n=!0;break}return n}))}(window.wc=window.wc||{}).settingsTracking=e}();