{"id":2793,"date":"2026-04-29T08:58:56","date_gmt":"2026-04-29T08:58:56","guid":{"rendered":"https:\/\/buy-super.com\/?page_id=2793"},"modified":"2026-04-29T09:23:52","modified_gmt":"2026-04-29T09:23:52","slug":"landing-cloning","status":"publish","type":"page","link":"https:\/\/buy-super.com\/index.php\/landing-cloning\/","title":{"rendered":"Landing Cloning"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"2793\" class=\"elementor elementor-2793\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-c81ec89 e-flex e-con-boxed e-con e-parent\" data-id=\"c81ec89\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-2dea4cd elementor-widget elementor-widget-html\" data-id=\"2dea4cd\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"editor-helper\" style=\"background:#1e1e1e; color:#d4d4d4; padding:20px; border-radius:8px; font-family: 'Consolas', monospace;\">\r\n    <h3 style=\"color:#4ec9b0; margin-top:0;\">\ud83d\udee0\ufe0f Editor Helper per Codici Lunghi<\/h3>\r\n    \r\n    <div style=\"margin-bottom:15px;\">\r\n        <p style=\"font-size:12px; color:#888;\">1. Incolla il codice -> 2. Identifica i blocchi -> 3. Copia il risultato commentato<\/p>\r\n        <textarea id=\"mainInput\" style=\"width:100%; height:200px; background:#252526; color:#ccc; border:1px solid #3e3e42; padding:10px;\" placeholder=\"Incolla qui il tuo HTML chilometrico...\"><\/textarea>\r\n    <\/div>\r\n\r\n    <div style=\"display:flex; gap:10px; margin-bottom:15px;\">\r\n        <button onclick=\"injectComments()\" style=\"flex:1; padding:12px; background:#007acc; color:white; border:none; cursor:pointer; font-weight:bold;\">\u2728 AGGIUNGI COMMENTI STRUTTURALI<\/button>\r\n        <button onclick=\"clearAll()\" style=\"padding:12px; background:#444; color:white; border:none; cursor:pointer;\">Reset<\/button>\r\n    <\/div>\r\n\r\n    <div id=\"statusUpdate\" style=\"font-size:13px; margin-bottom:10px; color:#ce9178;\"><\/div>\r\n\r\n    <div id=\"outputWrapper\" style=\"display:none;\">\r\n        <h4 style=\"color:#dcdcaa;\">Codice Pronto per l'Editing:<\/h4>\r\n        <textarea id=\"mainOutput\" style=\"width:100%; height:350px; background:#1e1e1e; color:#9cdcfe; border:1px solid #4ec9b0; padding:10px;\" readonly><\/textarea>\r\n        <button onclick=\"copyRes()\" style=\"margin-top:10px; width:100%; padding:10px; background:#4ec9b0; color:#000; font-weight:bold; border:none; cursor:pointer;\">COPIA TUTTO IL CODICE COMMENTATO<\/button>\r\n    <\/div>\r\n<\/div>\r\n\r\n<script>\r\nfunction injectComments() {\r\n    let raw = document.getElementById('mainInput').value;\r\n    const status = document.getElementById('statusUpdate');\r\n    \r\n    if(!raw.trim()) return alert(\"Incolla del codice!\");\r\n\r\n    status.innerHTML = \"Analisi in corso...\";\r\n\r\n    \/\/ Usiamo un approccio di sostituzione per blocchi per non appesantire il browser\r\n    \/\/ Cerchiamo i tag FORM e DIV con ID o Classi\r\n    let count = 0;\r\n    \r\n    \/\/ 1. Marcatura dei FORM (Priorit\u00e0 alta)\r\n    raw = raw.replace(\/<form([^>]*)>\/gi, (match, attrs) => {\r\n        count++;\r\n        return `\\n${match}`;\r\n    });\r\n    raw = raw.replace(\/<\\\/form>\/gi, () => {\r\n        return `<\/form> `;\r\n    });\r\n\r\n    \/\/ 2. Marcatura dei DIV con identit\u00e0 (ID o Classe)\r\n    \/\/ Questa regex cattura solo i div che hanno almeno un attributo, per evitare di commentare ogni singolo div di spaziatura\r\n    raw = raw.replace(\/<div([^>]+(?:id|class)=[\"']([^\"']+)[\"'][^>]*)>\/gi, (match, attrs, name) => {\r\n        count++;\r\n        \/\/ Puliamo il nome per renderlo leggibile nel commento\r\n        let shortName = name.split(' ')[0].substring(0, 20);\r\n        return `\\n${match}`;\r\n    });\r\n\r\n    \/\/ 3. Aggiunta commento di chiusura intelligente\r\n    \/\/ Cerchiamo i <\/div> e aggiungiamo un marcatore generico ma visibile\r\n    raw = raw.replace(\/<\\\/div>\/gi, () => {\r\n        return `<\/div> `;\r\n    });\r\n\r\n    document.getElementById('mainOutput').value = raw;\r\n    document.getElementById('outputWrapper').style.display = 'block';\r\n    status.innerHTML = \"\u2705 Operazione completata! Rilevati \" + count + \" blocchi significativi.\";\r\n}\r\n\r\nfunction copyRes() {\r\n    const out = document.getElementById('mainOutput');\r\n    out.select();\r\n    document.execCommand('copy');\r\n    alert(\"Codice con commenti copiato! Incollalo nel tuo editor.\");\r\n}\r\n\r\nfunction clearAll() {\r\n    document.getElementById('mainInput').value = \"\";\r\n    document.getElementById('outputWrapper').style.display = 'none';\r\n    document.getElementById('statusUpdate').innerHTML = \"\";\r\n}\r\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>\ud83d\udee0\ufe0f Editor Helper per Codici Lunghi 1. Incolla il codice -> 2. Identifica i blocchi -> 3. Copia il risultato commentato \u2728 AGGIUNGI COMMENTI STRUTTURALI Reset Codice Pronto per l&#8217;Editing: COPIA TUTTO IL CODICE COMMENTATO<\/p>\n","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2793","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/buy-super.com\/index.php\/wp-json\/wp\/v2\/pages\/2793","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buy-super.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/buy-super.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/buy-super.com\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/buy-super.com\/index.php\/wp-json\/wp\/v2\/comments?post=2793"}],"version-history":[{"count":28,"href":"https:\/\/buy-super.com\/index.php\/wp-json\/wp\/v2\/pages\/2793\/revisions"}],"predecessor-version":[{"id":2821,"href":"https:\/\/buy-super.com\/index.php\/wp-json\/wp\/v2\/pages\/2793\/revisions\/2821"}],"wp:attachment":[{"href":"https:\/\/buy-super.com\/index.php\/wp-json\/wp\/v2\/media?parent=2793"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}