PluginProbe ʕ •ᴥ•ʔ
Essential Classy Addons for Elementor – 150+ Widgets, Templates & Performance Tools / 3.0.21
Essential Classy Addons for Elementor – 150+ Widgets, Templates & Performance Tools v3.0.21
4.0 3.0.59 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 3.0 3.0.1 3.0.10 3.0.11 3.0.12 3.0.13 3.0.14 3.0.15 3.0.16 3.0.18 3.0.2 3.0.20 3.0.21 3.0.22 3.0.23 3.0.24 3.0.25 3.0.26 3.0.27 3.0.28 3.0.29 3.0.3 3.0.30 3.0.31 3.0.32 3.0.33 3.0.34 3.0.35 3.0.36 3.0.37 3.0.38 3.0.39 3.0.4 3.0.40 3.0.41 3.0.42 3.0.43 3.0.44 3.0.45 3.0.46 3.0.47 3.0.48 3.0.49 3.0.5 3.0.50 3.0.51 3.0.52 3.0.53 3.0.54 3.0.55 3.0.56 3.0.57 3.0.58 3.0.6 3.0.7 3.0.8 3.0.9
essential-classy-addons-for-elementor / assets / js / livecopy / ec-live-copy.js
essential-classy-addons-for-elementor / assets / js / livecopy Last commit date
ec-live-copy.js 2 years ago xdlocalstorage.js 2 years ago
ec-live-copy.js
1 lines
1 !function(){function s(e){return e.forEach(function(e,t){e.id=elementorCommon.helpers.getUniqueId(),0<e.elements.length&&s(e.elements)}),e}xdLocalStorage.init({iframeUrl:"https://kapasias.com/livecopy/",initCallback:function(){}});var i=["section","container","column","widget"],t=[];elementor.on("preview:loaded",function(){i.forEach(function(e,o){elementor.hooks.addFilter("elements/"+i[o]+"/contextMenuGroups",function(e,n){return t.push(n),e.push({name:"ec_"+i[o],actions:[{name:"ec_live_copy",title:"EC Copy",icon:"eicon-export-kit",callback:function(){var e={};e.ecElementType="widget"==i[o]?n.model.get("widgetType"):null,e.elementCode=n.model.toJSON(),xdLocalStorage.setItem("eccopycontents",JSON.stringify(e));var t=document.createElement("textarea");t.value=JSON.stringify(e),document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}},{name:"ec_live_paste",title:"EC Paste",icon:"eicon-import-kit",callback:function(){navigator.clipboard.readText().then(function(e){var t;!function(e){try{return JSON.parse(e),1}catch(e){return}}(e)||(t=JSON.parse(e),e&&"object"==typeof t&&t.elementCode&&(xdLocalStorage.setItem("eccopycontents",e),xdLocalStorage.getItem("eccopycontents",function(e){e&&e.value&&null!=e.value&&(function(e,t){var n=t,o=t.model.get("elType"),i=e.elementCode.elType,c=e.elementCode,a=JSON.stringify(c),t=/\.(jpg|png|jpeg|gif|svg)/gi.test(a),l={elType:i,settings:c.settings},r=null,d={index:0};i&&("section"==i||"container"==i?(l.elements=s(c.elements),r=elementor.getPreviewContainer()):"column"==i?(l.elements=s(c.elements),o&&("section"==o||"container"==o?r=n.getContainer():"column"==o?(r=n.getContainer().parent,d.index=n.getOption("_index")+1):"widget"==o&&(r=n.getContainer().parent.parent,d.index=n.getContainer().parent.view.getOption("_index")+1))):"widget"==i&&(l.widgetType=e.ecElementType,r=n.getContainer(),o&&("section"==o||"container"==o?r=n.children.findByIndex(0).getContainer():"column"==o?r=n.getContainer():"widget"==o&&(r=n.getContainer().parent,o.index=n.getOption("_index")+1,d.index=n.getOption("_index")+1))));var m=$e.run("document/elements/create",{model:l,container:r,options:d});t&&jQuery.ajax({url:ec_live_copy.ajax_url,method:"POST",data:{nonce:ec_live_copy.nonce,action:"ec_live_copy_nonce",copy_content:a}}).done(function(e){e.success&&(e=e.data[0],l.elType=e.elType,l.settings=e.settings,"widget"===l.elType?l.widgetType=e.widgetType:l.elements=e.elements,$e.run("document/elements/delete",{container:m}),$e.run("document/elements/create",{model:l,container:r,options:d}))})}(JSON.parse(e.value),n),xdLocalStorage.removeItem("ecetents"))})))})}}]}),e})})})}(jQuery);