‘;
printHtml += cleanHeaderHtml;
}
if (media) {
printHtml += media.outerHTML;
}
if (articleBody) {
const articleClone = articleBody.cloneNode(true);
articleClone.querySelectorAll(‘.post-flash’).forEach(function (el) {
el.parentNode.removeChild(el);
});
printHtml += articleClone.outerHTML;
}
const iframe = document.createElement(‘iframe’);
iframe.style.position = ‘fixed’;
iframe.style.right=”0″;
iframe.style.bottom = ‘0’;
iframe.style.width=”0″;
iframe.style.height=”0″;
iframe.style.border=”0″;
document.body.appendChild(iframe);
const frameWindow = iframe.contentWindow || iframe;
const title = document.title || ‘Yazdır’;
const headStyles = Array.from(document.querySelectorAll(‘link[rel=”stylesheet”], style’))
.map(el => el.outerHTML)
.join(”);
iframe.onload = function () {
try {
frameWindow.focus();
frameWindow.print();
} finally {
setTimeout(function () {
document.body.removeChild(iframe);
}, 1000);
}
};
const doc = frameWindow.document;
doc.open();
doc.write(`
${headStyles}
${printHtml}
`);
doc.close();
}
var dropdownButton = document.querySelector(‘.dropdownButton’);
if (dropdownButton) {
var icon = dropdownButton.querySelector(‘#icon’);
var parentDropdown = dropdownButton.closest(‘.dropdown’);
if (parentDropdown && icon) {
parentDropdown.addEventListener(‘show.bs.dropdown’, function () {
icon.classList.remove(‘fa-plus’);
icon.classList.add(‘fa-minus’);
});
parentDropdown.addEventListener(‘hide.bs.dropdown’, function () {
icon.classList.remove(‘fa-minus’);
icon.classList.add(‘fa-plus’);
});
}
}
A–
A+
