//js code to select mutiple tabs content together (function () { const tabIdSetString = ` #tabs-2 #tabs-4 `; const tabIdSetArray = tabIdSetString .trim() .split('\n') .map(item => item.trim()) .filter(Boolean); let finalHtml = ''; tabIdSetArray.forEach(item => { const mulaDiv = document.querySelector(item + ' .tab-content-section'); console.log('Checking selector:', item + ' .tab-content-section'); if (!mulaDiv) { console.error('Target div nahi mila:', item); return; } const children = Array.from(mulaDiv.children); if (children.length <= 1) { console.warn('⚠️ Content nahi mila:', item); return; } let html = children .slice(1) .map(child => child.outerHTML) .join('\n'); html = html.replace(/
]*>/gi, '
'); // har tab ka output add karo finalHtml += ` ===== ${item} ===== ${html} `; }); // -------- FINAL OUTPUT -------- const output = ` === SABHI TAB CONTENT === ${finalHtml} `; // -------- OLD STYLE COPY -------- const textarea = document.createElement("textarea"); textarea.value = output; document.body.appendChild(textarea); textarea.select(); document.execCommand("copy"); document.body.removeChild(textarea); alert("PDF & Image content copy ho gaya ✅"); console.log(output); })();