PATH:
home
/
lab2454c
/
foreclass.com
/
wp-content
/
plugins
/
search-replace-for-elementor
/
assets
/
dist
/
js
"use strict";var ELEMSNR=ELEMSNR||{},$=jQuery||{};ELEMSNR.pluginURL=elemsnr.plugin_url,ELEMSNR.ajaxURL=elemsnr.ajax_url,ELEMSNR.ajaxNonce=elemsnr.ajax_nonce,ELEMSNR.highlightColor="#dc00af",ELEMSNR.addNavMenu=function(t){var e,n;$("#elementor-panel-page-menu").length&&(e=$(".elementor-panel-menu-item-finder")).length&&((n=$("<div/>").addClass("elementor-panel-menu-item elementor-panel-menu-item-search-and-replace")).html('\n\t\t\t\t<div class="elementor-panel-menu-item-icon"><i class="eicon-search-results"></i></div>\n\t\t\t\t<div class="elementor-panel-menu-item-title">Search & Replace</div>\n\t\t\t'),e.after(n))},ELEMSNR.openSearchReplaceModal=function(t){var e=$("<div/>").addClass("elemsnr-search-replace").prop("id","elemsnr-search-replace");e.html('\n\t\t<div class="elemsnr-modal" id="elemsnr-modal">\n\t\t\t<div class="elemsnr-modal-body">\n\t\t\t\t<div class="elemsnr-modal-header">\n\t\t\t\t\t<div class="elemsnr-modal-logo">\n\t\t\t\t\t\t<i class="eicon-search-results"></i>\n\t\t\t\t\t\t<span class="elemsnr-modal-title">Search & Replace</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="elemsnr-modal-icons">\n\t\t\t\t\t\t<div id="elemsnr-modal-help" class="elemsnr-modal-help">\n\t\t\t\t\t\t\t<i class="eicon-help" aria-hidden="true"></i>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div id="elemsnr-modal-close" class="elemsnr-modal-close">\n\t\t\t\t\t\t\t<i class="eicon-close" aria-hidden="true"></i>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="elemsnr-modal-loading-bar"></div>\n\t\t\t\t</div>\n\t\t\t\t<div class="elemsnr-modal-content">\n\t\t\t\t\t<div id="elemsnr-output"></div>\n\t\t\t\t\t<div class="elemsnr-row elemsnr-row-html-regexp">\n\t\t\t\t\t\t<div class="elemsnr-col" data-tooltip="Search and replace HTML in the Text Editor widget with regular expressions (experts only).">\n\t\t\t\t\t\t\t<label for="elemsnr-html-regexp">\n\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\ttype="checkbox" \n\t\t\t\t\t\t\t\t\tid="elemsnr-html-regexp" \n\t\t\t\t\t\t\t\t\tname="elemsnr-html-regexp" \n\t\t\t\t\t\t\t\t\tautocomplete="off"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\tHTML with RegEx (experts only)\n\t\t\t\t\t\t\t\t\t<i class="eicon-help" aria-hidden="true"></i>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<label for="elemsnr-search-phrase">\n\t\t\t\t\t\t<i class="eicon-search"></i>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\t\tid="elemsnr-search-phrase"\n\t\t\t\t\t\t\tname="elemsnr-search-phrase"\n\t\t\t\t\t\t\tplaceholder="Enter your search phrase (no HTML allowed)..."\n\t\t\t\t\t\t\tautocomplete="off"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div class="elemsnr-modal-button-group">\n\t\t\t\t\t\t\t<button type="submit" name="elemsnr-search-button" class="elemsnr-button" />\n\t\t\t\t\t\t\t\tSearch\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</label>\n\t\t\t\t\t<label for="elemsnr-replace-with-phrase">\n\t\t\t\t\t\t<i class="eicon-site-search"></i>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\t\tid="elemsnr-replace-with-phrase"\n\t\t\t\t\t\t\tname="elemsnr-replace-with-phrase"\n\t\t\t\t\t\t\tplaceholder="Enter your replace with phrase (no HTML allowed)..."\n\t\t\t\t\t\t\tautocomplete="off"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</label>\n\t\t\t\t\t<div class="elemsnr-row elemsnr-row-options">\n\t\t\t\t\t\t<div class="elemsnr-col">\n\t\t\t\t\t\t\t<label for="elemsnr-text-only">\n\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\ttype="radio"\n\t\t\t\t\t\t\t\t\t\tid="elemsnr-text-only"\n\t\t\t\t\t\t\t\t\t\tname="elemsnr-text-and-link"\n\t\t\t\t\t\t\t\t\t\tautocomplete="off"\n\t\t\t\t\t\t\t\t\t\tchecked\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<span>Text-only</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t<label for="elemsnr-links">\n\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\ttype="radio"\n\t\t\t\t\t\t\t\t\t\tid="elemsnr-links"\n\t\t\t\t\t\t\t\t\t\tname="elemsnr-text-and-link"\n\t\t\t\t\t\t\t\t\t\tautocomplete="off"\n\t\t\t\t\t\t\t\t\t\tdisabled="disabled"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<span class="pro-only">Links (URLs)</span> \n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t<label for="elemsnr-images">\n\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\ttype="radio"\n\t\t\t\t\t\t\t\t\t\tid="elemsnr-images"\n\t\t\t\t\t\t\t\t\t\tname="elemsnr-text-and-link"\n\t\t\t\t\t\t\t\t\t\tautocomplete="off"\n\t\t\t\t\t\t\t\t\t\tdisabled="disabled"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<span class="pro-only">Images</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="elemsnr-col">\n\t\t\t\t\t\t\t<label for="elemsnr-highlight">\n\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\ttype="checkbox"\n\t\t\t\t\t\t\t\t\t\tid="elemsnr-highlight"\n\t\t\t\t\t\t\t\t\t\tname="elemsnr-highlight"\n\t\t\t\t\t\t\t\t\t\tautocomplete="off"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<span>Highlight text on search</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t<label for="elemsnr-case-sensitive">\n\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\ttype="checkbox"\n\t\t\t\t\t\t\t\t\t\tid="elemsnr-case-sensitive"\n\t\t\t\t\t\t\t\t\t\tname="elemsnr-case-sensitive"\n\t\t\t\t\t\t\t\t\t\tautocomplete="off"\n\t\t\t\t\t\t\t\t\t\tdisabled="disabled"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<span class="pro-only">Case-sensitive search and replace</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<button type="submit" name="elemsnr-html-regexp-button" class="elemsnr-button" />\n\t\t\t\t\t\tSearch & Replace\n\t\t\t\t\t</button>\n\t\t\t\t\t<div class="elemsnr-modal-button-group">\n\t\t\t\t\t\t<button type="submit" name="elemsnr-replace-button" class="elemsnr-button" />\n\t\t\t\t\t\t\tReplace\n\t\t\t\t\t\t</button>\n\t\t\t\t\t\t<button type="reset" name="elemsnr-clear-button" class="elemsnr-button">\n\t\t\t\t\t\t\tClear\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<p class="pro-note"><sup>*</sup> Get Search & Replace for Elementor <span class="pro-only"></span> to unlock the plugin, be able to use on pages with data larger than <em>50kb</em> in size and run the HTML with regular expressions feature with maximum requests.</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t'),$("#elemsnr-search-replace").remove(),$("body").append(e),$("#elemsnr-modal").draggable()},ELEMSNR.closeSearchReplaceModal=function(t){t.preventDefault(),$("#elemsnr-search-replace").remove()},ELEMSNR.highlightTermsOnLoad=function(){var t=$(".elemsnr-modal");t.length&&t.find('input[name="elemsnr-highlight"]:checked').length&&(elementor.reloadPreview(),elementor.once("preview:loaded",function(){elementor.$preview.contents().find("head").append($("<style/>").prop("id","elemsnr").html("elsnr-highlight { background-color: ".concat(ELEMSNR.highlightColor,"; padding: 3px; }")))}))},ELEMSNR.highlightTerms=function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];t.preventDefault();var n=$(t.target).closest(".elemsnr-modal"),l=new URL(document.location.href),a=n.find('input[name="elemsnr-search-phrase"]').val();!0===e&&(a=n.find("#elemsnr-undo-replace-with-phrase").text()),setTimeout(function(){$.ajax({method:"post",url:ELEMSNR.ajaxURL,data:{action:"elemsnr_highlight_search",security:ELEMSNR.ajaxNonce,current_post_id:l.searchParams.get("post"),search_phrase:a,replace_with_phrase:n.find('input[name="elemsnr-replace-with-phrase"]').val(),is_highlighted:n.find('input[name="elemsnr-highlight"]:checked').length,is_text_only:n.find('input[id="elemsnr-text-only"]:checked').length},beforeSend:function(){n.find(".elemsnr-modal-loading-bar").show()},success:function(t){void 0!==t.success&&!1===t.success||(1===(t=JSON.parse(t)[0]).status&&!1===e?ELEMSNR.reloadElementorEditor(n,t.message):($("#elemsnr-output").addClass("elemsnr-output-active"),$("#elemsnr-output").empty().html(t.message)))},complete:function(){n.find(".elemsnr-modal-loading-bar").hide()}})},500)},ELEMSNR.unHiglightTerms=function(t){t.preventDefault();var e=$(t.target).closest(".elemsnr-modal"),t=new URL(document.location.href);$.ajax({method:"post",url:ELEMSNR.ajaxURL,data:{action:"elemsnr_unhighlight_search",security:ELEMSNR.ajaxNonce,current_post_id:t.searchParams.get("post"),search_phrase:e.find('input[name="elemsnr-search-phrase"]').val(),replace_with_phrase:e.find('input[name="elemsnr-replace-with-phrase"]').val(),is_highlighted:e.find('input[name="elemsnr-highlight"]:checked').length,is_text_only:e.find('input[id="elemsnr-text-only"]:checked').length},beforeSend:function(){e.find(".elemsnr-modal-loading-bar").show()},success:function(t){void 0!==t.success&&!1===t.success||(t=JSON.parse(t)[0],e.find('input[name="elemsnr-search-phrase"]').val(""),e.find('input[name="elemsnr-replace-with-phrase"]').val(""),1===t.status?ELEMSNR.reloadElementorEditor(e,t.message):($("#elemsnr-output").addClass("elemsnr-output-active"),$("#elemsnr-output").empty().html(t.message)))},complete:function(){e.find(".elemsnr-modal-loading-bar").hide()}})},ELEMSNR.replaceTerms=function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];t.preventDefault();var n=$(t.target).closest(".elemsnr-modal"),l=new URL(document.location.href),a=n.find('input[name="elemsnr-search-phrase"]').val(),s=n.find('input[name="elemsnr-replace-with-phrase"]').val();!0===e&&(a=n.find("#elemsnr-undo-replace-with-phrase").text(),s=n.find("#elemsnr-undo-search-phrase").text()),setTimeout(function(){$.ajax({method:"post",url:ELEMSNR.ajaxURL,data:{action:"elemsnr_replace_search",security:ELEMSNR.ajaxNonce,current_post_id:l.searchParams.get("post"),search_phrase:a,replace_with_phrase:s,is_highlighted:n.find('input[name="elemsnr-highlight"]:checked').length,is_text_only:n.find('input[id="elemsnr-text-only"]:checked').length},beforeSend:function(){n.find(".elemsnr-modal-loading-bar").show()},success:function(t){void 0!==t.success&&!1===t.success||(t=JSON.parse(t)[0],n.find('input[name="elemsnr-search-phrase"]').val(""),n.find('input[name="elemsnr-replace-with-phrase"]').val(""),1===t.status?ELEMSNR.reloadElementorEditor(n,t.message):($("#elemsnr-output").addClass("elemsnr-output-active"),$("#elemsnr-output").empty().html(t.message)))},complete:function(){n.find(".elemsnr-modal-loading-bar").hide()}})},500)},ELEMSNR.reloadElementorEditor=function(t,e){t={search_phrase:t.find('input[name="elemsnr-search-phrase"]').val(),replace_with_phrase:t.find('input[name="elemsnr-replace-with-phrase"]').val(),is_highlighted:t.find('input[name="elemsnr-highlight"]:checked').length,show_is_highlighted:t.find('label[for="elemsnr-highlight"]').css("display"),is_text_only:t.find('input[id="elemsnr-text-only"]:checked').length,response_message:e};sessionStorage.setItem("elemsnr",JSON.stringify(t)),window.location.reload(!0)},ELEMSNR.reloadSearchReplaceModal=function(){var t,e=JSON.parse(sessionStorage.getItem("elemsnr"));null!==e&&(ELEMSNR.openSearchReplaceModal(),(t=$(".elemsnr-modal")).length)&&(t.find('input[name="elemsnr-search-phrase"]').val(e.search_phrase),t.find('input[name="elemsnr-replace-with-phrase"]').val(e.replace_with_phrase),t.find('input[name="elemsnr-highlight"]').prop("checked",e.is_highlighted),t.find('input[id="elemsnr-text-only"]').prop("checked",e.is_text_only),t.find('label[for="elemsnr-highlight"]').css("display",e.show_is_highlighted),$("#elemsnr-output").addClass("elemsnr-output-active"),$("#elemsnr-output").empty().html(e.response_message),t.find('input[name="elemsnr-highlight"]:checked').length&&(elementor.reloadPreview(),elementor.once("preview:loaded",function(){elementor.$preview.contents().find("head").append($("<style/>").prop("id","elemsnr").html("elsnr-highlight { background-color: ".concat(ELEMSNR.highlightColor,"; padding: 3px; }")))})),sessionStorage.removeItem("elemsnr"))},ELEMSNR.toggleHTMLRegEx=function(t){var t=$(t.target),e=t.closest(".elemsnr-modal");t.prop("checked")?(e.find('input[name="elemsnr-search-phrase"]').prop({type:"text",placeholder:"Enter your regular expression...",readonly:!1,class:""}),e.find('input[name="elemsnr-replace-with-phrase"]').prop({type:"text",placeholder:"Enter your replace with phrase or HTML...",readonly:!1,class:""}),e.find(".elemsnr-row-options input").prop("disabled",!0),e.find('.elemsnr-row-options label[for*="elemsnr-"]').hide(),e.find('button[name="elemsnr-search-button"]').hide(),e.find(".elemsnr-modal-button-group").hide(),e.find('button[name="elemsnr-html-regexp-button"]').show(),e.find("#elemsnr-output").addClass("elemsnr-output-active").html('\n\t\t\t\t\t<strong>Important:</strong> It is strongly recommended to <a href="/wp-admin/admin.php?page=elemsnr-backup" target="_blank">backup your database</a> before you run the search and replace. \n\t\t\t\t\tLearn how to use regular expressions at <a href="https://www.regular-expressions.info/" target="_blank">Regular Expressions</a>.\n\t\t\t\t')):(e.find('input[name="elemsnr-search-phrase"]').prop({type:"text",placeholder:"Enter your search phrase...(no HTML allowed)",readonly:!1,class:""}),e.find('input[name="elemsnr-replace-with-phrase"]').prop({type:"text",placeholder:"Enter your replace with phrase...(no HTML allowed)",readonly:!1,class:""}),e.find(".elemsnr-row-options input").prop("disabled",!1),e.find("input#elemsnr-text-only").prop("checked",!0),e.find('.elemsnr-row-options label[for*="elemsnr-"]').show(),e.find('button[name="elemsnr-search-button"]').show(),e.find(".elemsnr-modal-button-group").show(),e.find('button[name="elemsnr-html-regexp-button"]').hide(),e.find("#elemsnr-output").removeClass("elemsnr-output-active").empty())},ELEMSNR.replaceHTMLRegEx=function(t){t.preventDefault();var e=$(t.target).closest(".elemsnr-modal"),n=new URL(document.location.href),l=e.find('input[name="elemsnr-search-phrase"]').val(),a=e.find('input[name="elemsnr-replace-with-phrase"]').val();setTimeout(function(){$.ajax({method:"post",url:ELEMSNR.ajaxURL,data:{action:"elemsnr_replace_html_regex",security:ELEMSNR.ajaxNonce,current_post_id:n.searchParams.get("post"),search_phrase:l,replace_with_phrase:a},beforeSend:function(){e.find(".elemsnr-modal-loading-bar").show()},success:function(t){void 0!==t.success&&!1===t.success||(t=JSON.parse(t)[0],e.find('input[name="elemsnr-search-phrase"]').val(""),e.find('input[name="elemsnr-replace-with-phrase"]').val(""),1===t.status?ELEMSNR.reloadElementorEditor(e,t.message):($("#elemsnr-output").addClass("elemsnr-output-active"),$("#elemsnr-output").empty().html(t.message)))},complete:function(){e.find(".elemsnr-modal-loading-bar").hide()}})},500)},function(t){ELEMSNR.highlightTermsOnLoad(),ELEMSNR.reloadSearchReplaceModal(),t(document).on("click","#elementor-panel-header-menu-button",ELEMSNR.addNavMenu),t(document).on("click",".elementor-panel-menu-item-search-and-replace",ELEMSNR.openSearchReplaceModal),t(document).on("click","#elemsnr-modal-close",ELEMSNR.closeSearchReplaceModal),t(document).on("click",'input[name="elemsnr-html-regexp"]',ELEMSNR.toggleHTMLRegEx),t(document).on("click",'button[name="elemsnr-search-button"]',ELEMSNR.highlightTerms),t(document).on("click",'button[name="elemsnr-clear-button"]',ELEMSNR.unHiglightTerms),t(document).on("click",'button[name="elemsnr-replace-button"]',ELEMSNR.replaceTerms),t(document).on("click",'button[name="elemsnr-html-regexp-button"]',ELEMSNR.replaceHTMLRegEx),t(document).on("click",'a[name="elemsnr-undo-button"]',function(t){t.preventDefault(),ELEMSNR.highlightTerms(t,!0),setTimeout(function(){ELEMSNR.replaceTerms(t,!0)},500)})}(jQuery);
[-] elemsnr-search-replace.min.js
[edit]
[+]
..
[-] elemsnr-admin.min.js
[edit]